function dvec_complementx_test ( )

%*****************************************************************************80
%
%% dvec_complementx_test() tests dvec_complementx();
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 July 2021
%
%  Author:
%
%    John Burkardt
%
  n = 10;
  test_num = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'dvec_complementx_test():\n' );
  fprintf ( 1, '  dvec_complementx() returns the ten''s complement\n' );
  fprintf ( 1, '  of a (signed) decimal vector;\n' );
  fprintf ( 1, '\n' );

  for test = 1 : test_num
    
    i = randi ( [ -100, 100 ], 1 );

    dvec1 = i4_to_dvec ( i, n );

    dvec2 = dvec_complementx ( n, dvec1 );

    j = dvec_to_i4 ( n, dvec2 );

    fprintf ( 1, '\n' );
    fprintf ( 1, '  I = %8d\n', i );
    fprintf ( 1, '  J = %8d\n', j );
    dvec_print ( n, dvec1, ' ' );
    dvec_print ( n, dvec2, ' ' );

  end

  return
end
