support for Real.isInfitite and isNan

This commit is contained in:
sergeych committed 2026-03-31 19:08:11 +03:00
1 parent 850efedb72
commit a976702caf
4 files changed
+134

No files matched your search

@@ -5271,6 +5271,19 @@ class ScriptTest {
)
}
@Test
fun testRealIsInfiniteAndIsNaN() = runTest {
eval(
"""
assertEquals(false, 1.0.isInfinite())
assertEquals(true, (1.0 / 0.0).isInfinite())
assertEquals(true, (-1.0 / 0.0).isInfinite())
assertEquals(false, 1.0.isNaN())
assertEquals(true, (0.0 / 0.0).isNaN())
""".trimIndent()
)
}
@Test
fun testEmptySpreadList() = runTest {
eval(