# HG changeset patch # User Rik # Date 1515275154 28800 # Node ID bcaeb54397074518acd58679575b6f84142600cf # Parent 22a2bc91cc7f28ae9240376357bd9ddb7122c68f 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. diff -r 22a2bc91cc7f -r bcaeb5439707 libinterp/corefcn/data.cc --- 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