tricu

An interpreted language for exploring Tree Calculus
Log | Files | Refs | README | LICENSE

commit c578d780e9260490cbc3620ffce8088e8f96de52
parent 31106aa28528e30b2db5871d697d40be752051de
Author: James Eversole <james@eversole.co>
Date:   Sun, 29 Dec 2024 21:09:02 -0600

Updates to tests

Uncomments a test for comment parsing behavior and removes a test for
incomplete function definitions.

Diffstat:
Mtest/Spec.hs | 15+++++----------
1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/test/Spec.hs b/test/Spec.hs @@ -68,12 +68,7 @@ lexerTests = testGroup "Lexer Tests" parserTests :: TestTree parserTests = testGroup "Parser Tests" - [-- testCase "Error when parsing incomplete definitions" $ do - -- let input = lexTricu "x = " - -- case (runParser parseExpression "" input) of - -- Left _ -> return () - -- Right _ -> assertFailure "Expected failure on invalid input" - testCase "Error when assigning a value to T" $ do + [ testCase "Error when assigning a value to T" $ do let input = lexTricu "t = x" case (runParser parseExpression "" input) of Left _ -> return () @@ -152,10 +147,10 @@ parserTests = testGroup "Parser Tests" let input = "(t) -- (t) -- (t)" expect = [TLeaf] parseTricu input @?= expect --- , testCase "Comments with no terms" $ do --- let input = unlines ["-- (t)", "(t t)"] --- expect = [] --- parseTricu input @?= expect + , testCase "Comments with no terms" $ do + let input = unlines ["-- (t)", "(t t)"] + expect = [SEmpty,SApp TLeaf TLeaf] + parseTricu input @?= expect ] evaluationTests :: TestTree