1
1
% Run these tests with runMyTests
2
2
% All tests so far are on code expected to run without errors
3
- % If/when we end up with a version that _should_ error,
3
+ % If/when we end up with a version that _should_ error,
4
4
% please add it to this set of examples
5
5
classdef SmokeTests < matlab .unittest .TestCase
6
-
6
+
7
7
properties
8
8
rootProject
9
9
results
10
10
end
11
11
12
12
13
- methods (TestClassSetup )
13
+ methods (TestClassSetup )
14
14
15
15
function setUpPath(testCase )
16
-
16
+
17
17
try
18
18
project = currentProject ;
19
19
testCase.rootProject = project .RootFolder ;
20
20
cd(testCase .rootProject )
21
21
catch
22
22
error(" Load project prior to run tests" )
23
23
end
24
-
24
+
25
25
testCase .log(" Running in " + version )
26
26
27
27
end % function setUpPath
@@ -58,15 +58,10 @@ function smokeTest(testCase)
58
58
fprintf(fid ," %s,%s,%s,%s\n" ,release_version ,myFiles(kTest )," passed" ,testCase .results .Time(kTest ));
59
59
catch ME
60
60
testCase .results .Time(kTest ) = toc ;
61
- if ME .message == " Unknown service"
62
- disp(" Expected error: no doc availabile." )
63
- testCase .results .Passed(kTest ) = true ;
64
- else
65
- disp(" Failed " + myFiles(kTest ) + " because " + ...
61
+ disp(" Failed " + myFiles(kTest ) + " because " + ...
66
62
newline + ME .message )
67
- testCase .results .Message(kTest ) = ME .message ;
68
- fprintf(fid ," %s,%s,%s,%s\n" ,release_version ,myFiles(kTest )," failed" ,testCase .results .Time(kTest ));
69
- end
63
+ testCase .results .Message(kTest ) = ME .message ;
64
+ fprintf(fid ," %s,%s,%s,%s\n" ,release_version ,myFiles(kTest )," failed" ,testCase .results .Time(kTest ));
70
65
end
71
66
clearvars - except kTest testCase myFiles fid
72
67
end
@@ -85,4 +80,8 @@ function closeAllFigure(testCase)
85
80
86
81
end % methods (TestClassTeardown)
87
82
83
+ end
84
+
85
+ function doc(arg )
86
+ disp(" doc " + string(arg ))
88
87
end
0 commit comments