squiggle/packages/squiggle-lang/__tests__/Reducer/Reducer_externalBindings_test.res

73 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-04-17 17:24:39 +00:00
open Jest
open Reducer_TestHelpers
2022-04-17 18:32:47 +00:00
Skip.describe("Parse for Bindings", () => {
testParseOuterToBe(
"x",
"????",
)
testParseOuterToBe(
"x+1",
"????",
)
testParseOuterToBe(
"y = x+1; y",
"????",
)
testParsePartialToBe(
"x",
"????",
)
testParsePartialToBe(
"y=x",
"????",
)
testParsePartialToBe(
"y=x+1",
"????",
)
testParsePartialToBe(
"y = x+1; z = y",
"????",
)
})
2022-04-17 17:24:39 +00:00
2022-04-17 18:32:47 +00:00
Skip.describe("Eval for Bindings", () => {
testEvalBindingsToBe(
"x",
2022-04-17 17:24:39 +00:00
list{("x", ExpressionValue.EvNumber(1.))},
2022-04-17 18:32:47 +00:00
"????",
)
testEvalBindingsToBe(
2022-04-17 17:24:39 +00:00
"x+1",
list{("x", ExpressionValue.EvNumber(1.))},
2022-04-17 18:32:47 +00:00
"????",
)
testEvalBindingsToBe(
"y = x+1; y",
list{("x", ExpressionValue.EvNumber(1.))},
"????",
)
testEvalPartialBindingsToBe(
"x",
list{("x", ExpressionValue.EvNumber(1.))},
"????",
)
testEvalPartialBindingsToBe(
"y=x",
list{("x", ExpressionValue.EvNumber(1.))},
"????",
)
testEvalBindingsToBe(
"y=x+1",
list{("x", ExpressionValue.EvNumber(1.))},
"????",
)
testEvalBindingsToBe(
"y = x+1; z = y",
list{("x", ExpressionValue.EvNumber(1.))},
"????",
)
})