eval with bindings tested
This commit is contained in:
parent
46f3ee3d2c
commit
4826337a6a
|
@ -1,7 +1,7 @@
|
||||||
open Jest
|
open Jest
|
||||||
open Reducer_TestHelpers
|
open Reducer_TestHelpers
|
||||||
|
|
||||||
Only.describe("Parse for Bindings", () => {
|
describe("Parse for Bindings", () => {
|
||||||
testParseOuterToBe(
|
testParseOuterToBe(
|
||||||
"x",
|
"x",
|
||||||
"Ok((:$$bindExpression (:$$bindings) :x))",
|
"Ok((:$$bindExpression (:$$bindings) :x))",
|
||||||
|
@ -32,22 +32,25 @@ Only.describe("Parse for Bindings", () => {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
Skip.describe("Eval for Bindings", () => {
|
Only.describe("Eval with Bindings", () => {
|
||||||
testEvalBindingsToBe(
|
testEvalBindingsToBe(
|
||||||
"x",
|
"x",
|
||||||
list{("x", ExpressionValue.EvNumber(1.))},
|
list{("x", ExpressionValue.EvNumber(1.))},
|
||||||
"????",
|
"Ok(1)",
|
||||||
)
|
)
|
||||||
testEvalBindingsToBe(
|
testEvalBindingsToBe(
|
||||||
"x+1",
|
"x+1",
|
||||||
list{("x", ExpressionValue.EvNumber(1.))},
|
list{("x", ExpressionValue.EvNumber(1.))},
|
||||||
"????",
|
"Ok(2)",
|
||||||
)
|
)
|
||||||
testEvalBindingsToBe(
|
testEvalBindingsToBe(
|
||||||
"y = x+1; y",
|
"y = x+1; y",
|
||||||
list{("x", ExpressionValue.EvNumber(1.))},
|
list{("x", ExpressionValue.EvNumber(1.))},
|
||||||
"????",
|
"Ok(2)",
|
||||||
)
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
describe("Eval Partial", () => {
|
||||||
testEvalPartialBindingsToBe(
|
testEvalPartialBindingsToBe(
|
||||||
"x",
|
"x",
|
||||||
list{("x", ExpressionValue.EvNumber(1.))},
|
list{("x", ExpressionValue.EvNumber(1.))},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user