test_parses_application_with_var_arg :: Assertion
test_parses_application_with_var_arg =
  let program = "a = 2\ncube(1, a, 3)\n\n"
      assign  = StAssign $ AbsoluteAssignment "a" $ EVal $ Number 2
      cube    = StExpression $ EApp $ Application
        (LocalVariable "cube")
        [ ApplicationSingleArg $ EVal $ Number 1
        , ApplicationSingleArg $ EVar $ LocalVariable "a"
        , ApplicationSingleArg $ EVal $ Number 3
        ]
        Nothing
      expected = Program [assign, cube]
  in  parserTest program expected
test_parses_application_with_var_arg :: Assertion
test_parses_application_with_var_arg =
  let program = "a = 2\ncube(1, a, 3)\n\n"
      assign  = StAssign $ AbsoluteAssignment "a" $ EVal $ Number 2
      cube    = StExpression $ EApp $ Application
        (LocalVariable "cube")
        [ ApplicationSingleArg $ EVal $ Number 1
        , ApplicationSingleArg $ EVar $ LocalVariable "a"
        , ApplicationSingleArg $ EVal $ Number 3
        ]
        Nothing
      expected = Program [assign, cube]
  in  parserTest program expected
test_parses_application_with_var_arg =
  let program = "a = 2\ncube(1, a, 3)\n\n"
      assign  = StAssign $ AbsoluteAssignment "a" $ EVal $ Number 2
      cube    = StExpression $ EApp $ Application
        (LocalVariable "cube")
        [ ApplicationSingleArg $ EVal $ Number 1
        , ApplicationSingleArg $ EVar $ LocalVariable "a"
        , ApplicationSingleArg $ EVal $ Number 3
        ]
        Nothing
      expected = Program [assign, cube]
  in  parserTest program expected