[orx-expression-evaluator] Switch to antlr-kotlin for parser generation and make it a common kotlin module
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import org.amshove.kluent.shouldBeEqualTo
|
||||
import org.openrndr.extra.expressions.watchingExpression1
|
||||
import kotlin.test.Test
|
||||
|
||||
class TestExpressionDelegates {
|
||||
|
||||
@Test
|
||||
fun test() {
|
||||
val state = object {
|
||||
var expression = "x * x"
|
||||
val function1 by watchingExpression1(::expression, "x")
|
||||
}
|
||||
state.function1(5.0).shouldBeEqualTo(25.0)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user