Skip to content

Commit

Permalink
Add testing to makefile and remove some unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rudsvar committed Mar 26, 2019
1 parent 76ed345 commit 0d1c496
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GHCFLAGS = -Wall -Wextra
BUILDFLAGS = -i$(SRCDIR) -outputdir $(BUILDDIR)
BUILDDIR = build
SRCDIR = src
MAIN = app/Main.hs
MAIN = app/Main

$(EXE): FORCE
ghc $(GHCFLAGS) $(MAIN) $(BUILDFLAGS) -o $@
Expand All @@ -17,6 +17,10 @@ tags: FORCE
release: FORCE
ghc $(GHCFLAGS) -O2 $(MAIN) $(BUILDFLAGS) -o $(EXE)

test: FORCE
ghc $(GHCFLAGS) -itest test/Spec.hs $(BUILDFLAGS) -o $(BUILDDIR)/test
$(BUILDDIR)/test

clean:
rm -rf $(EXE) $(BUILDDIR)

Expand Down
1 change: 0 additions & 1 deletion test/LambadaParserTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Test.Hspec

import Parser.Parse
import Lambada.Parser
import Lambada.Expr

isParsedAs :: String -> Expr -> SpecWith (Arg Expectation)
isParsedAs s e =
Expand Down
2 changes: 1 addition & 1 deletion test/ParserTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module ParserTests where

import Test.Hspec
import Parser.Parse
import Data.Either (isRight, isLeft)
import Data.Either (isLeft)
import Data.Char (isDigit, isAlpha)

parserTests :: Spec
Expand Down

0 comments on commit 0d1c496

Please sign in to comment.