function i4mat_is_binary_test ( )

%*****************************************************************************80
%
%% i4mat_is_binary_test() tests i4mat_is_binary().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 September 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4mat_is_binary_test():\n' );
  fprintf ( 1, '  i4mat_is_binary() is TRUE if an I4MAT only contains\n' );
  fprintf ( 1, '  0 or 1 entries.\n' );

  m = 2;
  n = 3;

  x = [ ...
    0, 1, 0; ... 
    1, 0, 1 ];
  i4mat_print ( m, n, x, '  Matrix:' );
  if ( i4mat_is_binary ( x ) )
    fprintf ( 1, '  X is binary\n' );
  else
    fprintf ( 1, '  X is NOT binary.\n' );
  end

  x = [ ...
    1, 1, 1; ... 
    1, 1, 1 ];
  i4mat_print ( m, n, x, '  Matrix:' );
  if ( i4mat_is_binary ( x ) )
    fprintf ( 1, '  X is binary\n' );
  else
    fprintf ( 1, '  X is NOT binary.\n' );
  end

  x = [ ...
    0, 1, 0; ... 
    1, 2, 1 ];
  i4mat_print ( m, n, x, '  Matrix:' );
  if ( i4mat_is_binary ( x ) )
    fprintf ( 1, '  X is binary\n' );
  else
    fprintf ( 1, '  X is NOT binary.\n' );
  end

  return
end
