       def a, do: A1.no_func
       def b, do: A1.init
     end
-    """, """
+    """
+
+    warning = """
     warning: function A1.no_func/0 is undefined or private
       lib/a.ex:10
 
     """
+
+    assert_warnings(code, warning)
   end
 
   test "warnings: groups multiple warnings in one file" do
-    assert_warnings """
+    code = """
     defmodule A do
       def a, do: A.no_func
       def b, do: A2.no_func
       def c, do: A.no_func
       def d, do: A2.no_func
     end
-    """, """
+    """
+
+    warning = """
     warning: function A.no_func/0 is undefined or private
     Found at 2 locations:
       lib/a.ex:2

      lib/a.ex:5

    """
  end

  ## Callers

  test "callers: prints callers of specified Module" do
    assert_callers "A", """
    defmodule A do
      def a, do: A.a()
      def a(arg), do: A.a(arg)
      def b, do: A.b()
      def c, do: B.a()
    end
    """,
    """
    lib/a.ex:2: A.a/0
    lib/a.ex:3: A.a/1
    lib/a.ex:4: A.b/0
    """
  end

  test "callers: prints callers of specified Module.func" do
    assert_callers "A.a", """
    defmodule A do
      def a, do: A.a()
      def a(arg), do: A.a(arg)
      def b, do: A.b()
      def c, do: B.a()
    end
    """,
    """
    lib/a.ex:2: A.a/0
    lib/a.ex:3: A.a/1
    """
  end

  test "callers: prints callers of specified Module.func/arity" do
    assert_callers "A.a/0", """
    defmodule A do
      def a, do: A.a()
      def a(arg), do: A.a(arg)
      def b, do: A.b()
      def c, do: B.a()
    end
    """,
    """
    lib/a.ex:2: A.a/0
    """
  end

  test "callers: lists compile calls and macros" do
    assert_callers "A", """
    defmodule A do
      defmacro a_macro, do: :ok
      def a, do: :ok
    end
    """, """
    defmodule B do
      require A

      A.a_macro()
      A.a()
    end
    """,
    """
    lib/b.ex:5: A.a/0
    lib/b.ex:4: A.a_macro/0
    """
  end

  test "callers: handles aliases" do
    assert_callers "Enum", """
    defmodule A do
      alias Enum, as: E


        def func(_), do: B.no_func
      end
    end
    """

    warning = """
    warning: function B.no_func/0 is undefined or private
      lib/a.ex:7

    """

    assert_warnings(code, warning)
  end

  test "warnings: handles Erlang ops" do
    assert_no_warnings("""
    defmodule A do
      def a(a, b), do: a and b
      def b(a, b), do: a or b
    end
    """)
  end

  test "warnings: handles Erlang modules" do
    code = """
    defmodule A do
      def a, do: :not_a_module.no_module
      def b, do: :lists.no_func
    end
    """

    warning = """
    warning: function :not_a_module.no_module/0 is undefined (module :not_a_module is not available)
      lib/a.ex:2

