Skip to content

Commit

Permalink
Slight improvement to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
newlandsvalley committed Jul 29, 2019
1 parent c27f7b1 commit 6ec18e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions test/FileParser.purs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
module Test.FileParser (parserSuite) where

import Prelude (Unit, bind, discard, show, ($), (<<<), (<>))
import Prelude (Unit, bind, discard, ($), (<<<))
import Data.Midi (Recording)
import Data.Midi.Parser (normalise, parse)
import Node.Path as Path
import Effect.Exception (Error)
import Effect.Class (liftEffect)
import Control.Monad.Free (Free)
import Data.Either (Either(..))
Expand Down Expand Up @@ -43,12 +42,13 @@ assertParses fileName =

canParse :: String -> Test
canParse str =
case fullParse str of
Right _ ->
success
Left err ->
failure (err)
where
fullParse :: String -> Either String Recording
fullParse s =
(parse <<< normalise) s
let
fullParse :: String -> Either String Recording
fullParse s =
(parse <<< normalise) s
in
case fullParse str of
Right _ ->
success
Left err ->
failure (err)
2 changes: 1 addition & 1 deletion test/Instrument.purs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ roundTripGleitzmanProperty (TestGleitzman s) =
in
(Just s :: Maybe String) === name

instrumentChecksSuite :: forall t. Free TestF Unit
instrumentChecksSuite :: Free TestF Unit
instrumentChecksSuite = do
suite "instrument" do
test "unknown" do
Expand Down

0 comments on commit 6ec18e0

Please sign in to comment.