Home > functions > internal > unit-test > dsUnitTest_autogen_all.m

dsUnitTest_autogen_all

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 classdef dsUnitTest_autogen_all < matlab.unittest.TestCase
0002   properties
0003     unitTestDataPath = dsGetConfig('ds_unitTestData_path');
0004   end
0005   
0006   properties (TestParameter)
0007     dataFileName = dsUnitGetAutogenFiles();
0008   end
0009   
0010   methods (Test,  TestTags = {'autogen'})
0011     function testCellIn(testCase, dataFileName)
0012       args = load(fullfile(testCase.unitTestDataPath, 'autogen', dataFileName));
0013       expectedOut = args.argout;
0014       
0015       [~,filename] = fileparts2(dataFileName);
0016       fnName = strsplit(filename,'_autogen_');
0017       fh = str2func(fnName{1});
0018       
0019       [testOut{1:length(expectedOut)}] = feval(fh, args.argin{:});
0020       
0021       for ind = 1:length(expectedOut)
0022         testCase.verifyEqual(testOut{ind}, expectedOut{ind});
0023       end
0024       
0025     end
0026   end
0027   
0028 end

Generated on Tue 12-Dec-2017 11:32:10 by m2html © 2005