function tree_check_test ( )

%*****************************************************************************80
%
%% tree_check_test() tests tree_check().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 December 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'tree_check test()\n' );
  fprintf ( 1, '  tree_check() checks a tree.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Check?   N    T(1:N)\n' );
  fprintf ( 1, '\n' );
  
  for test = 1 : 4

    if ( test == 1 )
      n = 0;
      t = [ ;...
            ];
    elseif ( test == 2 )
      n = 3;
      t = [ 1, 2; ...
            2, 3 ];
    elseif ( test == 3 )
      n = 5;
      t = [ 1, 3, 4, 5; ...
            2, 4, 5, 3 ];
    elseif ( test == 4 )
      n = 6;
      t = [ 1, 2, 3, 4, 5 ; ...
            3, 3, 4, 5, 6 ];
    end

    fprintf ( 1, '\n' );
    check = tree_check ( n, t );
    fprintf ( 1, '      Check = %5s\n', mat2str ( check ) );
    i4mat_print ( 2, n - 1, t, '  Tree:' );
    
  end

  return
end
