       end
     end
 
-    test "ill defined optional callback" do
+    test "invalid optional callback" do
       assert_raise CompileError, ~r"invalid optional callback :foo", fn ->
         test_module do
           @optional_callbacks :foo

    test "@type with a binary" do
      bytecode =
        test_module do
          @type my_type :: binary
        end

      assert [type: {:my_type, {:type, _, :binary, []}, []}] = types(bytecode)
    end

    test "@type with an empty binary" do
      bytecode =
        test_module do
          @type my_type :: <<>>
        end

      assert [type: {:my_type, {:type, _, :binary, [{:integer, _, 0}, {:integer, _, 0}]}, []}] =
               types(bytecode)
    end

    test "@type with a binary with a base size" do
      bytecode =
        test_module do
          @type my_type :: <<_::3>>
        end

      assert [type: {:my_type, {:type, _, :binary, [{:integer, _, 3}, {:integer, _, 0}]}, []}] =
               types(bytecode)
    end

    test "@type with a binary with a unit size" do
      bytecode =
        test_module do
          @type my_type :: <<_::_*8>>
        end

      assert [type: {:my_type, {:type, _, :binary, [{:integer, _, 0}, {:integer, _, 8}]}, []}] =
               types(bytecode)
    end

    test "@type with a binary with a size and unit size" do
      bytecode =
        test_module do
          @type my_type :: <<_::3, _::_*8>>
        end

      assert [type: {:my_type, {:type, _, :binary, [{:integer, _, 3}, {:integer, _, 8}]}, []}] =
               types(bytecode)
    end

    test "@type with invalid binary spec" do

      :code.purge(SpecModuleAttributes)
    end

    test "@callback" do
      bytecode =
        test_module do
          @callback my_fun(integer) :: integer
