main = do
  allFiles <- getDirectoryContents testDir
  let files =  map (testDir `FilePath.combine`) $ 
        filter (\x -> FilePath.takeExtension x == ".js") allFiles
  let parsePretty = TestLabel "parser - printer composition" 
        (TestList (map parsePrettyTest files))
  results <- runTestTT parsePretty
  if errors results > 0 || failures results > 0 
    then exitFailure
    else putStrLn "All tests passed."
main = do
  allFiles <- getDirectoryContents testDir
  let files =  map (testDir `FilePath.combine`) $ 
        filter (\x -> FilePath.takeExtension x == ".js") allFiles
  let parsePretty = TestLabel "parser - printer composition" 
        (TestList (map parsePrettyTest files))
  results <- runTestTT parsePretty
  if errors results > 0 || failures results > 0 
    then exitFailure
    else putStrLn "All tests passed."
main = do
  allFiles <- getDirectoryContents testDir
  let files =  map (testDir `FilePath.combine`) $ 
        filter (\x -> FilePath.takeExtension x == ".js") allFiles
  let parsePretty = TestLabel "parser - printer composition" 
        (TestList (map parsePrettyTest files))
  results <- runTestTT parsePretty
  if errors results > 0 || failures results > 0 
    then exitFailure
    else putStrLn "All tests passed."