1+ % Run these tests with runMyTests
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,
4+ % please add it to this set of examples
5+ classdef smokeTests < matlab .unittest .TestCase
6+
7+ properties
8+ fc
9+ end
10+
11+ methods (TestClassSetup )
12+
13+ function setUpPath(testCase )
14+ testCase.fc = fullfile(pwd );
15+ rootDirName = extractBefore(testCase .fc ," tests" );
16+ addpath(rootDirName )
17+ end
18+
19+ end % methods (TestClassSetup)
20+
21+ methods (Test )
22+
23+ function runPart0(testCase )
24+ testCase .log(" Running Part0_ConceptReview.mlx" )
25+ run(" Part0_ConceptReview.mlx" )
26+ end
27+
28+ function runPart0Soln(testCase )
29+ testCase .log(" Running Part0_ConceptReviewSoln.mlx" )
30+ run(" Part0_ConceptReviewSoln.mlx" )
31+ end
32+
33+ function runPart1(testCase )
34+ testCase .log(" Running Part1_TransferFunctionBasics.mlx" )
35+ run(" Part1_TransferFunctionBasics.mlx" )
36+ end
37+
38+ function runPart1Soln(testCase )
39+ testCase .log(" Running Part1_TransferFunctionBasicsSoln.mlx" )
40+ run(" Part1_TransferFunctionBasicsSoln.mlx" )
41+ end
42+
43+ function runPart2(testCase )
44+ testCase .log(" Running Part2_PoleZeroAnalysis.mlx" )
45+ run(" Part2_PoleZeroAnalysis.mlx" )
46+ end
47+
48+ function runPart2Soln(testCase )
49+ testCase .log(" Running Part2_PoleZeroAnalysisSoln.mlx" )
50+ run(" Part2_PoleZeroAnalysisSoln.mlx" )
51+ end
52+
53+ function runPart3(testCase )
54+ testCase .log(" Running Part3_FrequencyDomainAnalysis.mlx" )
55+ run(" Part3_FrequencyDomainAnalysis.mlx" )
56+ end
57+
58+ function runPart3Soln(testCase )
59+ testCase .log(" Running Part3_FrequencyDomainAnalysisSoln.mlx" )
60+ run(" Part3_FrequencyDomainAnalysisSoln.mlx" )
61+ end
62+
63+ end
64+
65+ methods (TestClassTeardown )
66+
67+ function resetPath(testCase )
68+ cd(testCase .fc )
69+ end
70+
71+ end % methods (TestClassTeardown)
72+
73+ end
0 commit comments