function i4_bset_test ( )

%*****************************************************************************80
%
%% I4_BSET_TEST tests I4_BSET.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 June 2015
%
%  Author:
%
%    John Burkardt
%
  test_num = 2;

  i4_test = [ 101, -31 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'I4_BSET_TEST\n' );
  fprintf ( 1, '  I4_BSET sets a given bit to 1.\n' );

  for test = 1 : test_num

    i4 = i4_test(test);

    fprintf ( 1, '\n' );
    fprintf ( 1, '  Working on I4 = %d\n', i4 );
    fprintf ( 1, '\n' );
    fprintf ( 1, '       Pos     I4_BSET\n' );
    fprintf ( 1, '\n' );

    for pos = 0 : 31
  
      j = i4_bset ( i4, pos );

      fprintf ( 1, '  %8d  %12d\n', pos, j );

    end

  end

  return
end
