Updates to tests
Uncomments a test for comment parsing behavior and removes a test for incomplete function definitions.
This commit is contained in:
		
							
								
								
									
										15
									
								
								test/Spec.hs
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								test/Spec.hs
									
									
									
									
									
								
							| @ -68,12 +68,7 @@ lexerTests = testGroup "Lexer Tests" | |||||||
|  |  | ||||||
| parserTests :: TestTree | parserTests :: TestTree | ||||||
| parserTests = testGroup "Parser Tests" | parserTests = testGroup "Parser Tests" | ||||||
|   [-- testCase "Error when parsing incomplete definitions" $ do |   [ testCase "Error when assigning a value to T" $ 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 |  | ||||||
|       let input = lexTricu "t = x" |       let input = lexTricu "t = x" | ||||||
|       case (runParser parseExpression "" input) of |       case (runParser parseExpression "" input) of | ||||||
|         Left _ -> return () |         Left _ -> return () | ||||||
| @ -152,10 +147,10 @@ parserTests = testGroup "Parser Tests" | |||||||
|       let input = "(t) -- (t) -- (t)" |       let input = "(t) -- (t) -- (t)" | ||||||
|           expect = [TLeaf] |           expect = [TLeaf] | ||||||
|       parseTricu input @?= expect |       parseTricu input @?= expect | ||||||
| --  , testCase "Comments with no terms" $ do |   , testCase "Comments with no terms" $ do | ||||||
| --      let input = unlines ["-- (t)", "(t t)"] |       let input = unlines ["-- (t)", "(t t)"] | ||||||
| --          expect = [] |           expect = [SEmpty,SApp TLeaf TLeaf] | ||||||
| --      parseTricu input @?= expect |       parseTricu input @?= expect  | ||||||
|   ] |   ] | ||||||
|  |  | ||||||
| evaluationTests :: TestTree | evaluationTests :: TestTree | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 James Eversole
					James Eversole