## Test the optimal point.

for m = [ 1 : 10 ]
  x = repmat([1;1], m, 1);

  msg = sprintf("extended_rosenbrock1([1;1;...]) == 0 (m = %d)", m);
  unit_test_equals(msg, 0, extended_rosenbrock1(x));
end

## It should fail with the wrong number of coordinates.
f = extended_rosenbrock1([1]);
unit_test_equals("extended_rosenbrock1 fails when length(x) is odd", ...
		 true, ...
		 isna(f));
