Skip to content
Snippets Groups Projects
Commit 7f8607fe authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Merge branch 'ver_test' into 'master'

:bug: ver_less_than.m: account for equality of versions

See merge request Dynare/dynare!2281
parents a645e13c 21965eb7
Branches
No related tags found
No related merge requests found
......@@ -59,4 +59,11 @@ ver2='6-unstable-2021-12-18-1227-c43777f6';
ver1='6-unstable-2021-12-19-1953-d841fc7c';
t(1)=dassert(ver_greater_than(ver1,ver2),true);
T = all(t);
%@eof:4
\ No newline at end of file
%@eof:4
%@test:5
ver2='5.5';
ver1='5.5';
t(1)=dassert(ver_greater_than(ver1,ver2),false);
T = all(t);
%@eof:5
......@@ -29,7 +29,12 @@ function tf = ver_less_than(ver1, ver2)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
tf = true;
if strcmp(ver1,ver2)
tf = false;
return
else
tf = true;
end
ver1 = strsplit(ver1, {'.', '-'});
ver2 = strsplit(ver2, {'.', '-'});
......@@ -131,3 +136,10 @@ ver2='6-unstable-2021-12-19-1953-d841fc7c';
t(1)=dassert(ver_less_than(ver1,ver2),true);
T = all(t);
%@eof:4
%@test:5
ver1='5.5';
ver2='5.5';
t(1)=dassert(ver_less_than(ver1,ver2),false);
T = all(t);
%@eof:5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment