function hex_digit_to_i4_test ( )

%*****************************************************************************80
%
%% hex_digit_to_i4_test() tests hex_digit_to_i4().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 August 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'hex_digit_to_i4_test():\n' );
  fprintf ( 1, '  hex_digit_to_i4() converts hex_digit -> integer\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Hex  -> I4  ->  Hex\n' );
  fprintf ( 1, '\n' );

  for h1 = [ ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ...
    'a', 'b', 'c', 'd', 'e', 'f', ...
    'A', 'B', 'C', 'D', 'E', 'F', ...
    '?' ];

    i4 = hex_digit_to_i4 ( h1 );
    h2 = i4_to_hex_digit ( i4 );

    fprintf ( 1, '  "%s"    %2d    "%s"\n', h1, i4, h2 );

  end

  return
end
