From 4826337a6a1051d92886917706ef652d785dc441 Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Thu, 21 Apr 2022 19:28:29 +0200 Subject: [PATCH] eval with bindings tested --- .../Reducer/Reducer_externalBindings_test.res | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_externalBindings_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_externalBindings_test.res index 1ae7e1e3..aa55154c 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_externalBindings_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_externalBindings_test.res @@ -1,7 +1,7 @@ open Jest open Reducer_TestHelpers -Only.describe("Parse for Bindings", () => { +describe("Parse for Bindings", () => { testParseOuterToBe( "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( "x", list{("x", ExpressionValue.EvNumber(1.))}, - "????", + "Ok(1)", ) testEvalBindingsToBe( "x+1", list{("x", ExpressionValue.EvNumber(1.))}, - "????", + "Ok(2)", ) testEvalBindingsToBe( "y = x+1; y", list{("x", ExpressionValue.EvNumber(1.))}, - "????", + "Ok(2)", ) +}) + +describe("Eval Partial", () => { testEvalPartialBindingsToBe( "x", list{("x", ExpressionValue.EvNumber(1.))},