File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 14551455 # Tests that NaN is not a finite value.
14561456 nan.is-finite.not > [] +> nan-is-not-finite
14571457
1458+ # Tests that converting a number far outside i64 range to i64 throws an error,
1459+ # instead of silently saturating to Long.MAX_VALUE.
1460+ [] +> throws-on-converting-huge-number-to-i64
1461+ 1.0e30.as-i64 > @
1462+
14581463 # Tests that NaN is not an integer.
14591464 nan.is-integer.not > [] +> nan-is-not-integer
Original file line number Diff line number Diff line change @@ -25,7 +25,13 @@ public Phi lambda() {
2525 0 ,
2626 new Data .ToPhi (
2727 new BytesOf (
28- new Expect .Number (Expect .at (this , Phi .RHO )).it ().longValue ()
28+ Expect .at (this , Phi .RHO )
29+ .that (phi -> new Dataized (phi ).asNumber ())
30+ .otherwise ("must be a number" )
31+ .must (number -> number >= Long .MIN_VALUE && number <= Long .MAX_VALUE )
32+ .otherwise ("must fit into long range" )
33+ .that (Double ::longValue )
34+ .it ()
2935 ).take ()
3036 )
3137 );
You can’t perform that action at this time.
0 commit comments