diff --git a/tests/test_expcodes.m b/tests/test_expcodes.m new file mode 100644 index 0000000000000000000000000000000000000000..c7406f1280d1b0f4bcc614d157224cd31183be81 --- /dev/null +++ b/tests/test_expcodes.m @@ -0,0 +1,42 @@ +classdef test_expcodes < matlab.unittest.TestCase + + properties + expcode_obj; + SCDexps; + end + + properties(MethodSetupParameter) + expcode_number = {1,1005,1006}; % list of expcodes to test + end + + methods(TestClassSetup) + function setup_environment(testCase) + testCase.addTeardown(@cd,pwd); + testCase.addTeardown(@path,path); + + basePath = fullfile(fileparts(mfilename('fullpath')),'..'); + run(fullfile(basePath,'rtccode_paths')); + + % get SCD experimental code object container + testCase.SCDexps = SCDconf_createexpcodes; + 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); + testCase.expcode_obj.setup; % run setup this exp code + end + end + + methods(Test) + function test_expcode(testCase) + % attempt compiling tcv.slx for this expcode + tcv([],[],[],'compile'); + tcv([],[],[],'term'); + testCase.assertTrue(true); % dummy + end + + end +end \ No newline at end of file