function i4vec_is_binary_test ( )

%*****************************************************************************80
%
%% I4VEC_IS_BINARY_TEST tests I4VEC_IS_BINARY.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 March 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'I4VEC_IS_BINARY_TEST\n' );
  fprintf ( 1, '  I4VEC_IS_BINARY is TRUE if an I4VEC only contains\n' );
  fprintf ( 1, '  0 or 1 entries.\n' );

  n = 3;

  x = [ 0, 0, 0 ];
  fprintf ( 1, '\n' );
  i4vec_transpose_print ( n, x, '  X:' );
  if ( i4vec_is_binary ( n, x ) )
    fprintf ( 1, '  X is binary\n' );
  else
    fprintf ( 1, '  X is NOT binary.\n' );
  end

  x = [ 1, 0, 1 ];
  fprintf ( 1, '\n' );
  i4vec_transpose_print ( n, x, '  X:' );
  if ( i4vec_is_binary ( n, x ) )
    fprintf ( 1, '  X is binary\n' );
  else
    fprintf ( 1, '  X is NOT binary.\n' );
  end

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

  return
end
