diff --git a/algos/SCDliuqe/SCDalgo_liuqe_test.m b/algos/SCDliuqe/SCDalgo_liuqe_test.m index b6b165357ea881348cec78925ec2775eb8e6e06d..1d4e6913a6088785bf594825abdc79ada582d697 100644 --- a/algos/SCDliuqe/SCDalgo_liuqe_test.m +++ b/algos/SCDliuqe/SCDalgo_liuqe_test.m @@ -1,29 +1,35 @@ classdef SCDalgo_liuqe_test < matlab.unittest.TestCase + properties + algoobj = SCDalgo_liuqe_obj(); + end + + methods (TestClassSetup) + + function setup_conf(testCase) + testCase.assertWarningFree(@() SCDconf_setSIMconf); + end + function setup_algo(testCase) + testCase.assertInstanceOf(testCase.algoobj,'SCDclass_algo'); + end + + end methods (Test) - function test_compile(testCase) + function test_callinits(testCase) %% - SCDconf_setSIMconf; - - algoobj = SCDalgo_liuqe_obj; - algoobj.callinits; % calls inits defining fixed parameters etc - algoobj.setup; % calls possible tunable parameters - algoobj.compile; - algoobj.sim; + testCase.algoobj.callinits; % calls inits defining fixed parameters etc + end + + function test_setup(testCase) + testCase.algoobj.setup; % calls possible tunable parameters - modelname = algoobj.getname; - %% - try - eval(sprintf('%s([],[],[],''compile'')',modelname)); - catch - eval(sprintf('%s([],[],[],''term'')',modelname)); - end - eval(sprintf('%s([],[],[],''term'')',modelname)); - - sim(modelname) - %% end + + function test_compile(testCase) + testCase.algoobj.compile; + end + end end \ No newline at end of file