support for Decimal.isInfitite and isNan
This commit is contained in:
1 parent
a976702caf
commit
6e9333844e
4 files changed
+36
No files matched your search
@@ -51,6 +51,21 @@ class DecimalModuleTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDecimalIsInfiniteAndIsNaN() = runTest {
|
||||
val scope = Script.newScope()
|
||||
scope.eval(
|
||||
"""
|
||||
import lyng.decimal
|
||||
|
||||
assertEquals(false, 0.d.isInfinite())
|
||||
assertEquals(false, "12.34".d.isInfinite())
|
||||
assertEquals(false, 0.d.isNaN())
|
||||
assertEquals(false, "12.34".d.isNaN())
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDecimalModuleMixedIntOperators() = runTest {
|
||||
val scope = Script.newScope()
|
||||
|
||||
Reference in new issue
Block a user