File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,18 @@ function checkConstruction( testCase )
24
24
testCase.ComponentType = extractAfter( testClassName , 1 ) ;
25
25
26
26
% Attempt to construct the component.
27
- m = Model();
28
- componentConstructor = @() feval( testCase .ComponentType , m ) ;
29
- testCase .fatalAssertWarningFree( componentConstructor , ...
27
+ m = Model();
28
+ testCase .fatalAssertWarningFree( @() constructComponent , ...
30
29
" Calling the " + testCase .ComponentType + ...
31
30
" constructor was not warning free." )
32
31
32
+ function constructComponent()
33
+
34
+ c = feval( testCase .ComponentType , m ) ;
35
+ oc = onCleanup( @() delete( c ) );
36
+
37
+ end % constructComponent
38
+
33
39
end % checkConstruction
34
40
35
41
end % methods ( TestClassSetup )
You can’t perform that action at this time.
0 commit comments