testParseProgram :: Test
testParseProgram = TestList
  [ testEq "Parse program (with spaces)"
            (Prog (LetExpr [("x", constNum 3)]
                              (VarExpr "x")))
            "let x = 3 in x"
  ]
  where
    testEq msg expect prog = TestCase $
      assertEqual msg (Right expect) (parseProgram prog)
testParseProgram :: Test
testParseProgram = TestList
  [ testEq "Parse program (with spaces)"
            (Prog (LetExpr [("x", constNum 3)]
                              (VarExpr "x")))
            "let x = 3 in x"
  ]
  where
    testEq msg expect prog = TestCase $
      assertEqual msg (Right expect) (parseProgram prog)
testParseProgram = TestList
  [ testEq "Parse program (with spaces)"
            (Prog (LetExpr [("x", constNum 3)]
                              (VarExpr "x")))
            "let x = 3 in x"
  ]
  where
    testEq msg expect prog = TestCase $
      assertEqual msg (Right expect) (parseProgram prog)