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
Complex
Teste
Příklad
SHA Tester 2.1
ref and out
Find the missing number in an array1
recursion
a6
FindSmallest
UnityCubo