diff --git a/tests/test_expcodes.m b/tests/test_expcodes.m index 35600a123585af43d2aa57ec49f01a50cefdf635..b5a1c23481f3e4b53d30cde917220fc4d2748009 100644 --- a/tests/test_expcodes.m +++ b/tests/test_expcodes.m @@ -6,7 +6,7 @@ classdef test_expcodes < matlab.unittest.TestCase end properties(MethodSetupParameter) - expcode_number = {1,1005,1006,1010}; % list of expcodes to test + expcode_number = {'1','1005','1006','1010'}; % list of expcodes to test end methods(TestClassSetup) @@ -19,26 +19,35 @@ classdef test_expcodes < matlab.unittest.TestCase % get SCD experimental code object container testCase.SCDexps = SCDconf_createexpcodes; + + SCDconf_setSIMconf; % set ConfigurationSettings for Simulation end end - + methods(TestMethodSetup) function setup_expcode(testCase,expcode_number) % get this expcode object from expcode object container - testCase.expcode_obj = getbymaincode(testCase.SCDexps,expcode_number); - end - end - - methods(Test) - function test_callinits(testCase) - testCase.expcode_obj.callinits; + fprintf('\n=== Testing expcode %s ===\n',expcode_number); + testCase.expcode_obj = getbymaincode(testCase.SCDexps,str2double(expcode_number)); end - function test_setup(testCase) + function test_expcode_setup(testCase) + fprintf('\n=== Testing callinits for expcode %d: %s === \n',... + testCase.expcode_obj.maincode,testCase.expcode_obj.name); + testCase.expcode_obj.callinits; + + fprintf('\n=== Testing setup for expcode %d: %s === \n',... + testCase.expcode_obj.maincode,testCase.expcode_obj.name); + testCase.expcode_obj.setup; % run setup this exp code end - function test_expcode(testCase) + end + + methods(Test) + function tesdt_expcode(testCase) + fprintf('\n === Testing Simulink compilation for expcode %d: %s === \n',... + testCase.expcode_obj.maincode,testCase.expcode_obj.name); % attempt compiling tcv.slx for this expcode testCase.expcode_obj.compile; % compile tcv.slx with this expcode end