Reorganize tests and benchmark scripts.
Mainly to get rid of one top level directory. But this will also be useful when there are tests of the embedding API.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
IO.print(Num.fromString("123") == 123) // expect: true
|
||||
IO.print(Num.fromString("-123") == -123) // expect: true
|
||||
IO.print(Num.fromString("-0") == -0) // expect: true
|
||||
IO.print(Num.fromString("12.34") == 12.34) // expect: true
|
||||
IO.print(Num.fromString("-0.0001") == -0.0001) // expect: true
|
||||
IO.print(Num.fromString(" 12 ") == 12) // expect: true
|
||||
|
||||
// Test some non-number literals and ensure they return null.
|
||||
IO.print(Num.fromString("test1") == null) // expect: true
|
||||
IO.print(Num.fromString("") == null) // expect: true
|
||||
IO.print(Num.fromString("prefix1.2") == null) // expect: true
|
||||
IO.print(Num.fromString("1.2suffix") == null) // expect: true
|
||||
|
||||
// TODO: Parse hex and scientific numbers.
|
||||
Reference in New Issue
Block a user