   def test_is_even_in_guards(_number),
     do: false
 
-  test "is_odd" do
+  test "is_odd/1" do
     assert Integer.is_odd(0) == false
     assert Integer.is_odd(1) == true
     assert Integer.is_odd(2) == false

    assert test_is_odd_in_guards(11) == 11
  end

  test "is_even" do
    assert Integer.is_even(0) == true
    assert Integer.is_even(1) == false
    assert Integer.is_even(2) == true

    assert Integer.parse("++4", 10) === :error

    # Base should be in range 2..36
    assert_raise ArgumentError, "invalid base 1", fn -> Integer.parse("2", 1) end
    assert_raise ArgumentError, "invalid base 37", fn -> Integer.parse("2", 37) end

    # Base should be an integer
    assert_raise ArgumentError, "invalid base 10.2", fn -> Integer.parse("2", 10.2) end
  end

  test "to_string/1" do
    assert Integer.to_string(42) == "42"
    assert Integer.to_string(+42) == "42"
    assert Integer.to_string(-42) == "-42"
    assert Integer.to_string(-0001) == "-1"

    for n <- [42.0, :forty_two, '42', "42"] do
      assert_raise ArgumentError, fn ->
        Integer.to_string(n)
      end
    end
  end

  test "to_string/2" do
    assert Integer.to_string(42, 2) == "101010"
    assert Integer.to_string(42, 10) == "42"
    assert Integer.to_string(42, 16) == "2A"
    assert Integer.to_string(+42, 16) == "2A"
    assert Integer.to_string(-42, 16) == "-2A"
    assert Integer.to_string(-042, 16) == "-2A"

    for n <- [42.0, :forty_two, '42', "42"] do
      assert_raise ArgumentError, fn ->
        Integer.to_string(n, 42)
      end
    end

    for n <- [-1, 0, 1, 37] do
      assert_raise ArgumentError, fn ->
        Integer.to_string(42, n)
      end

      assert_raise ArgumentError, fn ->
        Integer.to_string(n, n)
      end
    end
  end

  test "to_char_list/1" do
    assert Integer.to_char_list(42) == '42'
    assert Integer.to_char_list(+42) == '42'
    assert Integer.to_char_list(-42) == '-42'
    assert Integer.to_char_list(-0001) == '-1'

    for n <- [42.0, :forty_two, '42', "42"] do
      assert_raise ArgumentError, fn ->
        Integer.to_char_list(n)
      end
    end
  end

  test "to_char_list/2" do
    assert Integer.to_char_list(42, 2) == '101010'
    assert Integer.to_char_list(42, 10) == '42'
    assert Integer.to_char_list(42, 16) == '2A'
    assert Integer.to_char_list(+42, 16) == '2A'
    assert Integer.to_char_list(-42, 16) == '-2A'
    assert Integer.to_char_list(-042, 16) == '-2A'

    for n <- [42.0, :forty_two, '42', "42"] do
      assert_raise ArgumentError, fn ->
        Integer.to_char_list(n, 42)
      end
    end

    for n <- [-1, 0, 1, 37] do
      assert_raise ArgumentError, fn ->
        Integer.to_char_list(42, n)
      end

      assert_raise ArgumentError, fn ->
        Integer.to_char_list(n, n)
      end
    end
  end
end
