function ksubset_lex_check_test ( )

%*****************************************************************************80
%
%% ksubset_lex_check_test() tests ksubset_lex_check().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 December 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ksubset_lex_check test():\n' );
  fprintf ( 1, '  ksubset_lex_check() checks a K subset of an N set.\n' );
  
  for test = 1 : 7

    if ( test == 1 )
      k = -1;
      n = 5;
      s = [ ];
    elseif ( test == 2 )
      k = 3;
      n = 0;
      s = [ 2, 3, 5 ];
    elseif ( test == 3 )
      k = 3;
      n = 5;
      s = [ 3, 2, 5 ];
    elseif ( test == 4 )
      k = 3;
      n = 5;
      s = [ 2, 3, 7 ];
    elseif ( test == 5 )
      k = 3;
      n = 5;
      s = [ 2, 3, 5 ];
    elseif ( test == 6 )
      k = 0;
      n = 5;
      s = [ ];
    elseif ( test == 7 )
      k = 0;
      n = 0;
      s = [ ];
    end

    check = ksubset_lex_check ( k, n, s );
    i4vec_transpose_print ( k, s, '  Subset:' );
    fprintf ( 1, '  N = %d, K = %d\n', n, k );
    fprintf ( 1, '  Check = %5s\n', mat2str ( check ) );
    
  end

  return
end
