Rename "compiler" functionality to Evaluator
Allows for stdin input for evaluation when no input file is provided.
This commit is contained in:
10
test/Spec.hs
10
test/Spec.hs
@ -1,7 +1,7 @@
|
||||
module Main where
|
||||
|
||||
import Compiler
|
||||
import Eval
|
||||
import FileEval
|
||||
import Lexer
|
||||
import Library
|
||||
import Parser
|
||||
@ -31,7 +31,7 @@ tests = testGroup "Tricu Tests"
|
||||
, evaluationTests
|
||||
, lambdaEvalTests
|
||||
, libraryTests
|
||||
, compilerTests
|
||||
, fileEvaluationTests
|
||||
, propertyTests
|
||||
]
|
||||
|
||||
@ -377,8 +377,8 @@ libraryTests = testGroup "Library Tests"
|
||||
result env @?= Stem Leaf
|
||||
]
|
||||
|
||||
compilerTests :: TestTree
|
||||
compilerTests = testGroup "Compiler tests"
|
||||
fileEvaluationTests :: TestTree
|
||||
fileEvaluationTests = testGroup "Evaluation tests"
|
||||
[ testCase "Forks" $ do
|
||||
res <- liftIO $ evaluateFile "./test/fork.tri"
|
||||
res @?= Fork Leaf Leaf
|
||||
@ -388,7 +388,7 @@ compilerTests = testGroup "Compiler tests"
|
||||
, testCase "Mapping and Equality" $ do
|
||||
res <- liftIO $ evaluateFile "./test/map.tri"
|
||||
res @?= Stem Leaf
|
||||
, testCase "Map evaluation to String -> compilation -> string decoding" $ do
|
||||
, testCase "Eval and decoding string" $ do
|
||||
res <- liftIO $ evaluateFile "./test/string.tri"
|
||||
decodeResult res @?= "String test!"
|
||||
]
|
||||
|
1
test/assignment.tri
Normal file
1
test/assignment.tri
Normal file
@ -0,0 +1 @@
|
||||
x = t (t t) t
|
Reference in New Issue
Block a user