function i4vec_binary_next_test ( )

%*****************************************************************************80
%
%% I4VEC_BINARY_NEXT_TEST tests I4VEC_BINARY_NEXT.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    30 March 2018
%
%  Author:
%
%    John Burkardt
%
  n = 3;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'I4VEC_BINARY_NEXT_TEST\n' );
  fprintf ( 1, '  I4VEC_BINARY_NEXT generates the next binary vector.\n' );
  fprintf ( 1, '\n' );
 
  bvec(1:n) = 0;

  while ( true )

    fprintf ( 1, '  ' );
    for ( i = 1 : n )
      fprintf ( 1, '%d', bvec(i) );
    end
    fprintf ( 1, '\n' );

    if ( all ( bvec(1:n) ) )
      break
    end

    bvec = i4vec_binary_next ( n, bvec );
 
  end

  return
end
