   test "kw missing space" do
     msg = "nofile:1: keyword argument must be followed by space after: foo:"
 
-    assert_compile_fail SyntaxError, msg, "foo:bar"
-    assert_compile_fail SyntaxError, msg, "foo:+"
-    assert_compile_fail SyntaxError, msg, "foo:+1"
+    assert_eval_raise SyntaxError, msg, "foo:bar"
+    assert_eval_raise SyntaxError, msg, "foo:+"
+    assert_eval_raise SyntaxError, msg, "foo:+1"
   end
 
   test "sigil terminator" do
-    assert_compile_fail TokenMissingError,
+    assert_eval_raise TokenMissingError,
       "nofile:3: missing terminator: \" (for sigil ~r\" starting at line 1)",
       '~r"foo\n\n'
 
-    assert_compile_fail TokenMissingError,
+    assert_eval_raise TokenMissingError,
       "nofile:3: missing terminator: } (for sigil ~r{ starting at line 1)",
       '~r{foo\n\n'
   end
 
   test "dot terminator" do
-    assert_compile_fail TokenMissingError,
+    assert_eval_raise TokenMissingError,
       "nofile:1: missing terminator: \" (for function name starting at line 1)",
       'foo."bar'
   end
 
   test "string terminator" do
-    assert_compile_fail TokenMissingError,
+    assert_eval_raise TokenMissingError,
       "nofile:1: missing terminator: \" (for string starting at line 1)",
       '"bar'
   end
 
   test "heredoc start" do
-    assert_compile_fail SyntaxError,
+    assert_eval_raise SyntaxError,
       "nofile:1: heredoc start must be followed by a new line after \"\"\"",
       '"""bar\n"""'
   end
 
   test "heredoc terminator" do
-    assert_compile_fail TokenMissingError,
+    assert_eval_raise TokenMissingError,
       "nofile:2: missing terminator: \"\"\" (for heredoc starting at line 1)",
       '"""\nbar'
-    assert_compile_fail SyntaxError,
+    assert_eval_raise SyntaxError,
       "nofile:2: invalid location for heredoc terminator, please escape token or move it to its own line: \"\"\"",
       '"""\nbar"""'
   end
 
   test "unexpected end" do
-    assert_compile_fail SyntaxError,
+    assert_eval_raise SyntaxError,
       "nofile:1: unexpected token: end",
       '1 end'
   end
 
   test "syntax error" do
-    assert_compile_fail SyntaxError,
+    assert_eval_raise SyntaxError,
       "nofile:1: syntax error before: '.'",
       '+.foo'
   end

      defstruct name: "john"
    end

    assert_compile_fail KeyError,
      "key :age not found in: %Kernel.ErrorsTest.GoodStruct{name: \"john\"}",
      '%#{GoodStruct}{age: 27}'

    assert_compile_fail CompileError,
      "nofile:1: unknown key :age for struct Kernel.ErrorsTest.GoodStruct",
      '%#{GoodStruct}{age: 27} = %{}'
  end

  test "name for defmodule" do
    assert_compile_fail CompileError,
      "nofile:1: invalid module name: 3",
      'defmodule 1 + 2, do: 3'
  end

  test "invalid unquote" do
    assert_compile_fail CompileError,
      "nofile:1: unquote called outside quote",
      'unquote 1'
  end

  test "invalid unquote splicing in oneliners" do
    assert_compile_fail ArgumentError,
      "unquote_splicing only works inside arguments and block contexts, " <>
      "wrap it in parens if you want it to work with one-liners",
      '''

  end

  test "def defmacro clause change" do
    assert_eval_raise CompileError,
      "nofile:3: defmacro foo/1 already defined as def",
      '''
      defmodule Kernel.ErrorsTest.DefDefmacroClauseChange do
