Mercurial > octave
comparison scripts/general/isequal.m @ 31203:4c2b83516eb7
isequal.m: Run BISTs for Java objects only conditionally (bug #62930).
* scripts/general/isequal.m: Run BISTs for Java objects only if Octave was
configured with Java support and a Java VM is available at runtime.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Fri, 26 Aug 2022 22:30:43 +0200 |
parents | 434b5a1b9498 |
children | 597f3ee61a48 |
comparison
equal
deleted
inserted
replaced
31202:434b5a1b9498 | 31203:4c2b83516eb7 |
---|---|
550 ## Matlab compatibility | 550 ## Matlab compatibility |
551 %!assert (isequal (sparse (1), sparse (1)), true) | 551 %!assert (isequal (sparse (1), sparse (1)), true) |
552 %!assert (isequal (sparse (1), sparse (1)), sparse (1), true) | 552 %!assert (isequal (sparse (1), sparse (1)), sparse (1), true) |
553 | 553 |
554 ## Java objects | 554 ## Java objects |
555 %!test <*62930> | 555 %!testif HAVE_JAVA; usejava ("jvm") <*62930> |
556 %! int1 = javaObject ("java.lang.Integer", 1.0); | 556 %! int1 = javaObject ("java.lang.Integer", 1.0); |
557 %! int2 = javaObject ("java.lang.Integer", 2.0); | 557 %! int2 = javaObject ("java.lang.Integer", 2.0); |
558 %! assert (isequal (int1, int1)); | 558 %! assert (isequal (int1, int1)); |
559 %! assert (! isequal (int1, 1.0)); | 559 %! assert (! isequal (int1, 1.0)); |
560 %! assert (! isequal (int1, int2)); | 560 %! assert (! isequal (int1, int2)); |