Skip to content
Snippets Groups Projects
Verified Commit d8f31e0d authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Sébastien Villemot
Browse files

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

(cherry picked from commit 21965eb7)
parent 9528c35d
Branches
Tags
No related merge requests found
Pipeline #10234 passed
......@@ -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