]> gitweb.michael.orlitzky.com - octave.git/blob - tests/rosenbrock1_tests.m
Add the cholesky_inf() function.
[octave.git] / tests / rosenbrock1_tests.m
1 ## Test the optimal point.
2
3 unit_test_equals("rosenbrock1([1;1]) == 0", ...
4 0, ...
5 rosenbrock1([1;1]));
6
7 ## It should fail with the wrong number of coordinates.
8 f = rosenbrock1([1]);
9 unit_test_equals("rosenbrock1 fails with too few coordinates", ...
10 true, ...
11 isna(f));
12
13 f = rosenbrock1([1;2;3]);
14 unit_test_equals("rosenbrock1 fails with too many coordinates", ...
15 true, ...
16 isna(f));