Mercurial > octave
changeset 24536:bcaeb5439707
Fix typos and add tolerance to linspace BIST tests in 22a2bc91cc7f.
* data.cc (Flinspace): Use correct variable names x1,x2,x3. Add tolerance of
eps to comparison of calculated spacing between values.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 06 Jan 2018 13:45:54 -0800 |
parents | 22a2bc91cc7f |
children | 11729ca6eb81 |
files | libinterp/corefcn/data.cc |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/data.cc Sat Jan 06 11:43:16 2018 -0800 +++ b/libinterp/corefcn/data.cc Sat Jan 06 13:45:54 2018 -0800 @@ -5142,11 +5142,11 @@ %! x2 = linspace (1, 2, 10); %! x3 = linspace (1, -2, 10); %! assert (size (x1) == [1, 100] && x1(1) == 1 && x1(100) == 2); -%! assert (x(2) - x(1), (2 - 1)/ (100 - 1)); +%! assert (x1(2) - x1(1), (2 - 1)/ (100 - 1), eps); %! assert (size (x2) == [1, 10] && x2(1) == 1 && x2(10) == 2); -%! assert (x(2) - x(1), (2 - 1)/ (10 - 1)); +%! assert (x2(2) - x2(1), (2 - 1)/ (10 - 1), eps); %! assert (size (x3) == [1, 10] && x3(1) == 1 && x3(10) == -2); -%! assert (x(2) - x(1), (1 - -2)/ (10 - 1)); +%! assert (x3(2) - x3(1), (1 - -2)/ (10 - 1), eps); ## Test complex values %!test