File tree Expand file tree Collapse file tree 1 file changed +3
-33
lines changed Expand file tree Collapse file tree 1 file changed +3
-33
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function test_checkCfgDefault()
1818 expectedStructure.testingDevice = ' pc' ;
1919
2020 %% test
21- checkSubFields (expectedStructure , cfg );
21+ assertEqual (expectedStructure , cfg );
2222
2323end
2424
@@ -73,7 +73,7 @@ function test_checkCfgBasic()
7373 expectedStructure = orderfields(expectedStructure );
7474
7575 %% test
76- checkSubFields (expectedStructure , cfg );
76+ assertEqual (expectedStructure , cfg );
7777
7878end
7979
@@ -124,34 +124,4 @@ function test_checkCfgBasic()
124124
125125 expectedCfgStructure = orderfields(expectedCfgStructure );
126126
127- end
128-
129- function checkSubFields(expectedStructure , cfg )
130- % check that that the structures match
131- % if it fails it check from which subfield the error comes from
132-
133- try
134-
135- assertEqual(expectedStructure , cfg );
136-
137- catch ME
138-
139- if isstruct(expectedStructure )
140-
141- names = fieldnames(expectedStructure );
142-
143- for i = 1 : numel(names )
144-
145- disp(names{i });
146- testSubFields(expectedStructure.(names{i }), cfg.(names{i }));
147-
148- end
149-
150- end
151-
152- disp(expectedStructure );
153- disp(cfg );
154-
155- rethrow(ME );
156- end
157- end
127+ end
You can’t perform that action at this time.
0 commit comments