Add tests for wood1().
[octave.git] / tests / wood1_tests.m
1 ## Test the optimal point.
2 unit_test_equals("wood1([1;1;1;1]) == 0", ...
3 0, ...
4 wood1([1;1;1;1]));
5
6 ## It should fail with the wrong number of coordinates.
7 f = wood1([1;2;3]);
8 unit_test_equals("wood1 fails with too few coordinates", ...
9 true, ...
10 isna(f));
11
12 f = wood1([1;2;3;4;5]);
13 unit_test_equals("wood1 fails with too many coordinates", ...
14 true, ...
15 isna(f));