77 IrrYaw
88 end
99
10- methods (Access = ' public' )
11- function obj = TestPassiveYawRegression(openCompare )
10+ methods (Access = ' public' )
11+ function obj = TestPassiveYawRegression(openCompare )
1212 arguments
1313 openCompare (1 ,1 ) double = 1
14- end
14+ end
1515 % Assign arguments to test Class
16- obj.openCompare = openCompare ;
16+ obj.openCompare = openCompare ;
1717 % Set test directory
18- obj.testDir = fileparts(mfilename(' fullpath' ));
18+ obj.testDir = fileparts(mfilename(' fullpath' ));
1919 % Save the visibility state at construction
20- obj.OriginalDefault = get(0 ,' DefaultFigureVisible' );
21- end
20+ obj.OriginalDefault = get(0 ,' DefaultFigureVisible' );
21+ end
2222 end
2323
2424 methods (TestMethodSetup )
@@ -27,32 +27,32 @@ function killPlots (~)
2727 end
2828 end
2929
30- methods (TestClassSetup )
31- function runYawIrrTest(testCase )
30+ methods (TestClassSetup )
31+ function runYawIrrTest(testCase )
3232 cd(fullfile(testCase .testDir , ...
33- ' PassiveYawRegression' ))
33+ ' PassiveYawRegression' ))
3434 runLoadPassiveYawIrr ;
3535 close_system(' OSWEC' ,0 )
3636 testCase.IrrYaw = load(' IrrYaw.mat' ).(" IrrYaw" );
3737 cd(fullfile(testCase .testDir ));
3838 end
3939 end
4040
41- methods (TestClassTeardown )
42- function plotRegressionTests(testCase )
41+ methods (TestClassTeardown )
42+ function plotRegressionTests(testCase )
4343 % Open new vs. org Comparisons
44- if testCase .openCompare == 1
44+ if testCase .openCompare == 1
4545 cd(testCase .testDir );
46- open(fullfile(' .' ,' PassiveYawRegression' ,' figYawIrr.fig' ));
47- end
46+ open(fullfile(' .' ,' PassiveYawRegression' ,' figYawIrr.fig' ));
47+ end
4848 set(0 ,' DefaultFigureVisible' ,testCase .OriginalDefault );
4949 testCase .assertEqual(get(0 ,' DefaultFigureVisible' ), ...
50- testCase .OriginalDefault );
51- cd(testCase .testDir );
50+ testCase .OriginalDefault );
51+ cd(testCase .testDir );
5252 end
5353 end
5454
55- methods (Test )
55+ methods (Test )
5656 function body1_irregYaw_disp_yaw(testCase )
5757 % Body1 Displacement in Yaw
5858 tol = 1e- 10 ;
@@ -66,7 +66,7 @@ function body1_irregYaw_torque_yaw(testCase)
6666 testCase .verifyEqual(testCase .IrrYaw .Force_diff ,0 ,' AbsTol' ,tol );
6767 fprintf([' Body1 Torque in Yaw, Diff = ' ...
6868 num2str(testCase .IrrYaw .Force_diff ) ' \n ' ]);
69- end
69+ end
7070 function irregYaw_0th_Spectral_Moment(testCase )
7171 % 0th Order Spectral Moment
7272 tol = 1e- 10 ;
@@ -75,7 +75,7 @@ function irregYaw_0th_Spectral_Moment(testCase)
7575 testCase .verifyEqual(new ,org ,' AbsTol' ,tol );
7676 fprintf([' 0th Order Spectral Moment, Diff = ' ...
7777 num2str(max(abs(org - new ))) ' \n ' ]);
78- end
78+ end
7979 function irregYaw_2nd_Spectral_Moment(testCase )
8080 % 2nd Order Spectral Moment
8181 tol = 1e- 10 ;
@@ -84,6 +84,6 @@ function irregYaw_2nd_Spectral_Moment(testCase)
8484 testCase .verifyEqual(new ,org ,' AbsTol' ,tol );
8585 fprintf([' 2nd Order Spectral Moment, Diff = ' ...
8686 num2str(max(abs(org - new ))) ' \n ' ]);
87- end
87+ end
8888 end
8989end
0 commit comments