Skip to content

Commit

Permalink
one more UT
Browse files Browse the repository at this point in the history
  • Loading branch information
b3b00 committed Dec 4, 2018
1 parent 643a47c commit 37aa637
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ParserTests/EBNFTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,18 @@ public void TestContextualParsing()
Assert.True(res.IsOk);
Assert.Equal(4,res.Result);
}

[Fact]
public void TestContextualParsing2()
{
var buildResult = buildSimpleExpressionParserWithContext();

Assert.False(buildResult.IsError);
var parser = buildResult.Result;
var res = parser.ParseWithContext("2 + a * b", new Dictionary<string, int> {{"a", 2},{"b",3}});
Assert.True(res.IsOk);
Assert.Equal(8,res.Result);
}


#endregion
Expand Down

0 comments on commit 37aa637

Please sign in to comment.