We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21d8b54 commit 11cfb78Copy full SHA for 11cfb78
tests/tComponent.m
@@ -24,12 +24,18 @@ function checkConstruction( testCase )
24
testCase.ComponentType = extractAfter( testClassName, 1 );
25
26
% Attempt to construct the component.
27
- m = Model();
28
- componentConstructor = @() feval( testCase.ComponentType, m );
29
- testCase.fatalAssertWarningFree( componentConstructor, ...
+ m = Model();
+ testCase.fatalAssertWarningFree( @() constructComponent, ...
30
"Calling the " + testCase.ComponentType + ...
31
" constructor was not warning free." )
32
+ function constructComponent()
33
+
34
+ c = feval( testCase.ComponentType, m );
35
+ oc = onCleanup( @() delete( c ) );
36
37
+ end % constructComponent
38
39
end % checkConstruction
40
41
end % methods ( TestClassSetup )
0 commit comments