     assert Code.require_file(fixture_path("code_sample.exs")) != nil
   end
 
-  test "string to quoted" do
-    assert Code.string_to_quoted("1 + 2")  == {:ok, {:+, [line: 1], [1, 2]}}
-    assert Code.string_to_quoted!("1 + 2") == {:+, [line: 1], [1, 2]}
-
-    assert Code.string_to_quoted("a.1") ==
-           {:error, {1, "syntax error before: ", "1"}}
-
-    assert_raise SyntaxError, fn ->
-      Code.string_to_quoted!("a.1")
-    end
+  test "string_to_quoted/1" do
+    assert Code.string_to_quoted("1 + 2") == {:ok, {:+, [line: 1], [1, 2]}}
+    assert Code.string_to_quoted("a.1") == {:error, {1, "syntax error before: ", "1"}}
   end
 
-  test "string to quoted existing atoms only" do
-    assert :badarg = catch_error(Code.string_to_quoted!(":there_is_no_such_atom", existing_atoms_only: true))
-  end
-
-  test "string_to_quoted!" do
+  test "string_to_quoted!/1 works as string_to_quoted/1 but raises on errors" do
     assert Code.string_to_quoted!("1 + 2") == {:+, [line: 1], [1, 2]}
 
     assert_raise SyntaxError, fn ->

    end
  end

  test "eval with unnamed scopes" do
    assert {%RuntimeError{}, [a: %RuntimeError{}]} =
           Code.eval_string("a = (try do (raise \"hello\") rescue e -> e end)")
  end

  test "eval options" do
    assert Code.eval_string("is_atom(:foo) and K.is_list([])", [],
                            functions: [{Kernel, [is_atom: 1]}],
                            macros: [{Kernel, [..: 2, and: 2]}],
                            aliases: [{K, Kernel}],
                            requires: [Kernel]) == {true, []}
  end

  test "eval stacktrace" do
    try do
      Code.eval_string("<<a :: size(b)>>", a: :a, b: :b)
    rescue
      _ ->
        assert System.stacktrace |> Enum.any?(&(elem(&1, 0) == __MODULE__))
    end
  end

  test "eval with requires" do
    assert Code.eval_string("Kernel.if true, do: :ok", [], requires: [Z, Kernel]) == {:ok, []}
  end

  test "eval quoted" do
    assert Code.eval_quoted(quote(do: 1 + 2)) == {3, []}
    assert CodeTest.Sample.eval_quoted_info() == {CodeTest.Sample, "sample.ex", 13}
  end

  test "eval quoted with env" do
    alias :lists, as: MyList
    assert Code.eval_quoted(quote(do: MyList.flatten [[1, 2, 3]]), [], __ENV__) == {[1, 2, 3], []}
  end

  test "eval file" do
    assert Code.eval_file(fixture_path("code_sample.exs")) == {3, [var: 3]}

    assert_raise Code.LoadError, fn ->

    end
  end

  test "string_to_quoted!/2 raises with the :existing_atoms_only option" do
    assert catch_error(Code.string_to_quoted!(":there_is_no_such_atom", existing_atoms_only: true)) == :badarg
  end

  test "compile source" do
    assert __MODULE__.__info__(:compile)[:source] == String.to_charlist(__ENV__.file)
  end
