Skip to content
Snippets Groups Projects
Verified Commit 18b5fdd7 authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

test(extendpolar): add test on correct value


Signed-off-by: Thomas Lambert's avatarThomas Lambert <t.lambert@uliege.be>
parent b27959ab
No related branches found
Tags v1.2.0
No related merge requests found
......@@ -96,7 +96,7 @@ if sign(min(alpha(:,1))) == sign(max(alpha(:,1)))
end
try
findstall(alpha, cl, cd)
findstall(alpha, cl, cd);
catch
error('MATLAB:extendpolar:noStall',['To be extended, a polar must at '...
'least contain the stall point.']);
......
......@@ -9,8 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release
### Changed
### Deprecated
......@@ -20,3 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security
## [1.0.0] - 2022-04-08
- Initial release
[Unreleased]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.0.0...master
[1.0.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/releases/v1.0.0
......@@ -192,3 +192,21 @@ end
%% Test if function returns expected outputs
function test_correctAlphaSize(testCase)
% Verify if the output alpha has the correct size
% Should not re-expand polar that already covers the full range
Polar = dummysinglepolar();
stepAlpha = min(diff(Polar.alpha));
fullRange = (-pi:stepAlpha:pi)';
[alphaExt, clExt, cdExt] = af_tools.extendpolar(Polar);
[alphaExt2, clExt2, cdExt2] = af_tools.extendpolar(alphaExt, clExt, cdExt);
verifyEqual(testCase, alphaExt, fullRange, 'AbsTol',1e-9);
verifyEqual(testCase, alphaExt2, alphaExt);
verifyEqual(testCase, clExt2, clExt);
verifyEqual(testCase, cdExt2, cdExt);
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment