Newer
Older
classdef SCDalgo_test < SCDtest
properties (Abstract=true)
algoobj % SCD algo obj name - abstract allows modification by sub-class
end
methods (TestClassSetup)
function clear_base(testCase)
% clear base workspace
testCase.assertWarningFree(@() evalin('base','clear'));
end
function clear_sldd(testCase)
SCD.clean_dd
testCase.assertTrue(true);
end
function setup_conf(testCase)
testCase.assertWarningFree(@() SCDconf_setConf('SIM'));
function setup_algo(testCase)
testCase.assertInstanceOf(testCase.algoobj,'SCDclass_algo');
testCase.algoobj.init; % init data dictionary & fixed params
end
end
methods (TestClassTeardown)
function close_dd(testCase) %#ok<MANU>
Simulink.data.dictionary.closeAll('-discard');
end
function close_bd(testCase) %#ok<MANU>
bdclose all;
end
methods (Test)
function test_printinfo(testCase)
testCase.algoobj.printinfo;
end
function test_setup(testCase)
testCase.algoobj.setup; % setup tunable parameters
end
function test_compile(testCase)
testCase.algoobj.compile; % update model (Ctrl-D) Simulink
testCase.algoobj.test_harness;
end
end