11% Run these tests with runMyTests
22% 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,
44% please add it to this set of examples
55classdef SmokeTests < matlab .unittest .TestCase
6-
6+
77 properties
88 rootProject
99 results
1010 end
1111
1212
13- methods (TestClassSetup )
13+ methods (TestClassSetup )
1414
1515 function setUpPath(testCase )
16-
16+
1717 try
1818 project = currentProject ;
1919 testCase.rootProject = project .RootFolder ;
2020 cd(testCase .rootProject )
2121 catch
2222 error(" Load project prior to run tests" )
2323 end
24-
24+
2525 testCase .log(" Running in " + version )
2626
2727 end % function setUpPath
@@ -58,15 +58,10 @@ function smokeTest(testCase)
5858 fprintf(fid ," %s,%s,%s,%s\n" ,release_version ,myFiles(kTest )," passed" ,testCase .results .Time(kTest ));
5959 catch ME
6060 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 " + ...
6662 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 ));
7065 end
7166 clearvars - except kTest testCase myFiles fid
7267 end
@@ -85,4 +80,8 @@ function closeAllFigure(testCase)
8580
8681 end % methods (TestClassTeardown)
8782
83+ end
84+
85+ function doc(arg )
86+ disp(" doc " + string(arg ))
8887end
0 commit comments