File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
convex-core/src/test/java/convex/core/lang Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -463,17 +463,21 @@ public static void doIntegerTests(AInteger a) {
463
463
assertEquals (a .abs (),RT .multiply (signum ,a ));
464
464
if (signum .equals (CVMLong .ONE )) {
465
465
assertTrue (a .isPositive ());
466
+ assertTrue (a .isNatural ());
466
467
} else if (signum .equals (CVMLong .MINUS_ONE )) {
467
468
assertTrue (a .isNegative ());
469
+ assertFalse (a .isNatural ());
468
470
} else {
469
471
assertTrue (a .isZero ());
472
+ assertTrue (a .isNatural ());
470
473
}
471
474
472
475
doGenericNumberTests (a );
473
476
}
474
477
475
478
public static void doDoubleTests (CVMDouble a ) {
476
479
CVMDouble signum = a .signum ();
480
+ assertFalse (a .isNatural ());
477
481
assertEquals (a .abs (),RT .multiply (signum ,a ));
478
482
479
483
assertEquals (Math .signum (a .doubleValue ()),signum .doubleValue ());
You can’t perform that action at this time.
0 commit comments