Enable basic ScriptTest eval cases
This commit is contained in:
parent
bca5912942
commit
72a060d42f
@ -171,7 +171,7 @@ class ScriptTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("incremental enable")
|
@Ignore("Scope.eval should seed compile-time symbols from current scope")
|
||||||
@Test
|
@Test
|
||||||
fun testForLoopDoesNotCancelOnNaturalCompletion() = runTest {
|
fun testForLoopDoesNotCancelOnNaturalCompletion() = runTest {
|
||||||
val scope = Script.newScope()
|
val scope = Script.newScope()
|
||||||
@ -345,7 +345,6 @@ class ScriptTest {
|
|||||||
// assertEquals(Token(")", src.posAt(1, 17), Token.Type.RPAREN), p.next())
|
// assertEquals(Token(")", src.posAt(1, 17), Token.Type.RPAREN), p.next())
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Ignore("incremental enable")
|
|
||||||
@Test
|
@Test
|
||||||
fun parse1Test() {
|
fun parse1Test() {
|
||||||
val src = "2 + 7".toSource()
|
val src = "2 + 7".toSource()
|
||||||
@ -357,7 +356,6 @@ class ScriptTest {
|
|||||||
assertEquals(Token("7", src.posAt(0, 4), Token.Type.INT), p.next())
|
assertEquals(Token("7", src.posAt(0, 4), Token.Type.INT), p.next())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("incremental enable")
|
|
||||||
@Test
|
@Test
|
||||||
fun compileNumbersTest() = runTest {
|
fun compileNumbersTest() = runTest {
|
||||||
assertEquals(ObjInt(17), eval("17"))
|
assertEquals(ObjInt(17), eval("17"))
|
||||||
@ -374,7 +372,6 @@ class ScriptTest {
|
|||||||
assertEquals(ObjReal(314.0), eval("100\n 3.14e2"))
|
assertEquals(ObjReal(314.0), eval("100\n 3.14e2"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("incremental enable")
|
|
||||||
@Test
|
@Test
|
||||||
fun compileBuiltinCallsTest() = runTest {
|
fun compileBuiltinCallsTest() = runTest {
|
||||||
// println(eval("π"))
|
// println(eval("π"))
|
||||||
@ -387,7 +384,7 @@ class ScriptTest {
|
|||||||
assertTrue(eval("sin(π)").toDouble() - 1 < 0.000001)
|
assertTrue(eval("sin(π)").toDouble() - 1 < 0.000001)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("incremental enable")
|
@Ignore("Scope.eval should seed compile-time symbols from current scope")
|
||||||
@Test
|
@Test
|
||||||
fun varsAndConstsTest() = runTest {
|
fun varsAndConstsTest() = runTest {
|
||||||
val scope = Scope(pos = Pos.builtIn)
|
val scope = Scope(pos = Pos.builtIn)
|
||||||
@ -454,7 +451,6 @@ class ScriptTest {
|
|||||||
assertEquals(37, scope.eval("foo(3,14)").toInt())
|
assertEquals(37, scope.eval("foo(3,14)").toInt())
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("incremental enable")
|
|
||||||
@Test
|
@Test
|
||||||
fun nullAndVoidTest() = runTest {
|
fun nullAndVoidTest() = runTest {
|
||||||
val scope = Scope(pos = Pos.builtIn)
|
val scope = Scope(pos = Pos.builtIn)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user