     assert {:error, _} = Regex.compile("foo", "uy")
   end
 
-  test "compile with erl opts" do
+  test "compile/1 with Erlang options" do
     {:ok, regex} = Regex.compile("foo\\sbar", [:dotall, {:newline, :anycrlf}])
     assert "foo\nbar" =~ regex
   end
 
-  test "regex?" do
-    assert Regex.regex?(~r/foo/)
-    refute Regex.regex?(0)
-  end
-
-  test "source" do
-    src = "foo"
-    assert Regex.source(Regex.compile!(src)) == src
-    assert Regex.source(~r/#{src}/) == src
-
-    src = "\a\b\d\e\f\n\r\s\t\v"
-    assert Regex.source(Regex.compile!(src)) == src
-    assert Regex.source(~r/#{src}/) == src
-
-    src = "\a\\b\\d\\e\f\n\r\\s\t\v"
-    assert Regex.source(Regex.compile!(src)) == src
-    assert Regex.source(~r/#{src}/) == src
-  end
-
-  test "literal source" do
-    assert Regex.source(Regex.compile!("foo")) == "foo"
-    assert Regex.source(~r"foo") == "foo"
-    assert Regex.re_pattern(Regex.compile!("foo"))
-           == Regex.re_pattern(~r"foo")
-
-    assert Regex.source(Regex.compile!("\a\b\d\e\f\n\r\s\t\v")) == "\a\b\d\e\f\n\r\s\t\v"
-    assert Regex.source(~r<\a\b\d\e\f\n\r\s\t\v>) == "\a\\b\\d\\e\f\n\r\\s\t\v"
-    assert Regex.re_pattern(Regex.compile!("\a\b\d\e\f\n\r\s\t\v"))
-           == Regex.re_pattern(~r"\a\010\177\033\f\n\r \t\v")
-
-    assert Regex.source(Regex.compile!("\a\\b\\d\e\f\n\r\\s\t\v")) == "\a\\b\\d\e\f\n\r\\s\t\v"
-    assert Regex.source(~r<\a\\b\\d\\e\f\n\r\\s\t\v>) == "\a\\\\b\\\\d\\\\e\f\n\r\\\\s\t\v"
-    assert Regex.re_pattern(Regex.compile!("\a\\b\\d\e\f\n\r\\s\t\v"))
-           == Regex.re_pattern(~r"\a\b\d\e\f\n\r\s\t\v")
-  end
-
-  test "opts" do
+  test "compile!/1" do
+    assert Regex.regex?(Regex.compile!("foo"))
+
+    assert_raise Regex.CompileError, ~r/position 0$/, fn ->
+      Regex.compile!("*foo")
+    end
+  end
+
+  test "opts/1" do
     assert Regex.opts(Regex.compile!("foo", "i")) == "i"
   end
 
-  test "Unicode" do
-    assert "olá" =~ ~r"\p{Latin}$"u
-    refute "£" =~ ~r/\p{Lu}/u
-
-    # Non breaking space matches [[:space:]] with Unicode
-    assert <<0xA0::utf8>> =~ ~r/[[:space:]]/u
-    assert <<0xA0::utf8>> =~ ~r/\s/u
-
-    assert <<?<, 255, ?>>> =~ ~r/<.>/
-    refute <<?<, 255, ?>>> =~ ~r/<.>/u
-  end
-
-  test "names" do
+  test "names/1" do
     assert Regex.names(~r/(?<FOO>foo)/) == ["FOO"]
   end
 
-  test "match?" do
+  test "match?/2" do
     assert Regex.match?(~r/foo/, "foo")
     refute Regex.match?(~r/foo/, "FOO")
     assert Regex.match?(~r/foo/i, "FOO")

    assert "aa" =~ ~r/(a)\1/
  end

  test "compile!" do
    assert Regex.regex?(Regex.compile!("foo"))

    assert_raise Regex.CompileError, ~r/position 0$/, fn ->
      Regex.compile!("*foo")
    end
  end

  test "compile" do
    {:ok, regex} = Regex.compile("foo")
    assert Regex.regex?(regex)
    assert {:error, _} = Regex.compile("*foo")

    assert Regex.match?(~r/foo$/,  "afoo")
  end

  test "named_captures/2" do
    assert Regex.named_captures(~r/(?<foo>c)(?<bar>d)/, "abcd") == %{"bar" => "d", "foo" => "c"}
    assert Regex.named_captures(~r/c(?<foo>d)/, "abcd") == %{"foo" => "d"}
    assert Regex.named_captures(~r/c(?<foo>d)/, "no_match") == nil
