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

fix(xf2mat): issue with autosave

parent 6d74c642
No related branches found
Tags 2.0.1
No related merge requests found
Pipeline #6981 passed
......@@ -262,6 +262,7 @@ end
% --------------------------------------------------------------------------------------------------
function filename = genfilename(Polar)
% GENFILENAME Generates a proper filename for the saved file
import af_tools.utils.appendextension
......@@ -269,7 +270,7 @@ function filename = genfilename(Polar)
order = floor(log10(Polar.reynolds));
reBase = round(Polar.reynolds ./ 10.^order);
if nbFiles == 1
if length(Polar.reynolds) == 1
reStr = sprintf('-Re_%de%d', reBase, order);
else
reStr = sprintf('-Re_%de%d-%de%d', reBase(1), order(1), reBase(end), order(end));
......
......@@ -9,8 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Unit tests for **utils.selig** and **utils.lednicer**
### Changed
### Deprecated
......@@ -19,6 +17,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
## [2.0.1] - 2022-05-24
### Added
- Unit tests for **utils.selig** and **utils.lednicer**
- **xf2mat**: test for autosave
### Fixed
- **xf2mat**: bug with autosave
## [2.0.0] - 2022-04-24
### Added
......@@ -75,7 +84,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial release
[Unreleased]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v2.0.0...master
[Unreleased]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v2.0.1...master
[2.0.1]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v2.0.0...v2.0.1
[2.0.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.2.0...v2.0.0
[1.2.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.1.0...v1.2.0
[1.1.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.0.0...v1.1.0
......
......@@ -212,3 +212,18 @@ function test_correctOutputValues(testCase)
verifyEqual(testCase, Polar.airfoil, {'NACA_2412'});
end
function test_autosave(testCase)
% Verify if file is properly saved
testdir = [pwd, '/test_utils'];
Polar = af_tools.xf2mat(testdir, 'xfoil-naca2412_re1e6', 'autosave', true);
savedPolar = load('NACA_2412-Re_1e6.mat');
savedPolar = savedPolar.Polar;
verifyEqual(testCase, Polar, savedPolar);
% Cleanup
delete NACA_2412-Re_1e6.mat;
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