function bal_seq_check_test ( )

%*****************************************************************************80
%
%% bal_seq_check_test() tests bal_seq_check().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 November 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'bal_seq_check test():\n' );
  fprintf ( 1, '  bal_seq_check() checks N and T(1:2*N).\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Check?   N    T(1:2*N)\n' );
  fprintf ( 1, '\n' );
  
  for test = 1 : 3

    n = 5;

    if ( test == 1 )
      t = [ 0, 0, 1, 0, 1, 0, 0, 1, 1, 1 ];
    elseif ( test == 2 )
      t = [ 1, 1, 0, 1, 0, 1, 1, 0, 0, 0 ];
    elseif ( test == 3 )
      t = [ 0, 0, 1, 0, 1, 0, 0, 1, 0, 1 ];
    end

    check = bal_seq_check ( n, t );

    fprintf ( 1, '      %5s  %2d', mat2str ( check ), n );
    i4vec_transpose_print ( 2 * n, t, '' );

  end

  return
end
