diff --git a/matlab/utilities/version/ver_greater_than.m b/matlab/utilities/version/ver_greater_than.m index 447b4b8a624d1d045419a16a11b9ae78e1cff8c1..13d287a65d2fd5399aa8fb4629e66ed8970cebd5 100644 --- a/matlab/utilities/version/ver_greater_than.m +++ b/matlab/utilities/version/ver_greater_than.m @@ -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 diff --git a/matlab/utilities/version/ver_less_than.m b/matlab/utilities/version/ver_less_than.m index 76a3dcef2f056403fada1ecdad15a5489b18819f..4caaa9a4a338a2fb6ee3a27d590a327486c5bbcc 100644 --- a/matlab/utilities/version/ver_less_than.m +++ b/matlab/utilities/version/ver_less_than.m @@ -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