function polyomino_area_test ( )

%*****************************************************************************80
%
%% polyomino_area_test() tests polyomino_area().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 April 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polyomino_area_test():\n' );
  fprintf ( 1, '  polyomino_area() returns the area of a polyomino.\n' );

  for i = 1 : 5

    ns = randi( [ 1, 20 ] );
    ps = polyomino_random ( ns );
    p = polyomino_sparse_to_full ( ps );
    [ m, n ] = size ( p );
    label = sprintf ( ...
      '  Random polyomino of %d squares on %d by %d grid', ns, m, n );
    polyomino_print ( p, label );
    area = polyomino_area ( p );
    fprintf ( 1, '\n' );
    fprintf ( 1, '  Area is %d\n', area );

  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polyomino_area_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

