Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
prettier Tasty
module TestParser where import Test.Tasty (TestTree, defaultMain, testGroup) import Test.Tasty.HUnit (testCase, (@?=)) import Parser import Token prettyTestCaseShow :: Show a => String -> a -> TestTree prettyTestCaseShow prettyOut construct = testCase prettyOut $ show construct @?= prettyOut prettyTestCase :: (Eq b, Show b) => (String -> [b]) -> String -> [b] -> TestTree prettyTestCase f prettyIn result = testCase prettyIn $ f prettyIn @?= result testParser :: TestTree testParser = testGroup "all" [ prettyTestCase tokenize "x1 = -15 / (2 + x2)" [ TokIdent "x1", TokAssign, TokOp Minus, TokNum 15.0, TokOp Div, TokLParen, TokNum 2.0, TokOp Plus, TokIdent "x2", TokRParen ] ]
run
|
edit
|
history
|
help
0
New House Exam 11 April
Linked list solution with remove
ds
Padma narwade
Plt-D v.0.8.5
Pizzas & List of Tuples
compiled prog
sleep thread
valida fechas sura
Delegates