diff libinterp/corefcn/mappers.cc @ 24555:0645853d12d6

test: Mark certain bugs as xtest when run on Mac platforms (bug #52627). * dlmread.cc: For BIST tests that fail due to bug #47413, protect test with "testif ; ! ismac ()" so that it is not run on Mac platforms. Duplicate failing test code, but protect it with: %!xtest <47413> %! ## Same test code as above, but intended only for test statistics on Mac. %! if (! ismac ()), return; endif so that it is run only on Mac platforms and contributes to xtest statistics. * mappers.cc (Facos, Facosh, Fasin, Fasinh): Use run-time conditional (! ismac * ()) to run regular BIST code on non-mac platforms. Create xtest which only executes on Macs to document failure.
author Rik <rik@octave.org>
date Mon, 08 Jan 2018 10:25:24 -0800
parents 194eb4bd202b
children 6ece7c7e4912
line wrap: on
line diff
--- a/libinterp/corefcn/mappers.cc	Sun Jan 07 21:40:34 2018 -0800
+++ b/libinterp/corefcn/mappers.cc	Mon Jan 08 10:25:24 2018 -0800
@@ -126,7 +126,15 @@
 
 ## Test large magnitude arguments (bug #45507)
 ## Test fails with older versions of libm, solution is to upgrade.
-%!test <*45507>
+%!testif ; ! ismac ()   <*45507>
+%! x = [1, -1, i, -i] .* 1e150;
+%! v = [0, pi, pi/2, pi/2];
+%! assert (real (acos (x)), v);
+
+%!xtest <52627>
+%! ## Same test code as above, but intended only for test statistics on Mac.
+%! ## Mac trig/hyperbolic functions have huge tolerances.
+%! if (! ismac ()), return; endif
 %! x = [1, -1, i, -i] .* 1e150;
 %! v = [0, pi, pi/2, pi/2];
 %! assert (real (acos (x)), v);
@@ -193,7 +201,15 @@
 
 ## Test large magnitude arguments (bug #45507)
 ## Test fails with older versions of libm, solution is to upgrade.
-%!test <*45507>
+%!testif ; ! ismac ()   <*45507>
+%! x = [1, -1, i, -i] .* 1e150;
+%! v = [0, pi, pi/2, -pi/2];
+%! assert (imag (acosh (x)), v);
+
+%!xtest <52627>
+%! ## Same test code as above, but intended only for test statistics on Mac.
+%! ## Mac trig/hyperbolic functions have huge tolerances.
+%! if (! ismac ()), return; endif
 %! x = [1, -1, i, -i] .* 1e150;
 %! v = [0, pi, pi/2, -pi/2];
 %! assert (imag (acosh (x)), v);
@@ -313,7 +329,15 @@
 
 ## Test large magnitude arguments (bug #45507)
 ## Test fails with older versions of libm, solution is to upgrade.
-%!test <*45507>
+%!testif ; ! ismac ()   <*45507>
+%! x = [1, -1, i, -i] .* 1e150;
+%! v = [pi/2, -pi/2, 0, -0];
+%! assert (real (asin (x)), v);
+
+%!xtest <52627>
+%! ## Same test code as above, but intended only for test statistics on Mac.
+%! ## Mac trig/hyperbolic functions have huge tolerances.
+%! if (! ismac ()), return; endif
 %! x = [1, -1, i, -i] .* 1e150;
 %! v = [pi/2, -pi/2, 0, -0];
 %! assert (real (asin (x)), v);
@@ -348,7 +372,15 @@
 
 ## Test large magnitude arguments (bug #45507)
 ## Test fails with older versions of libm, solution is to upgrade.
-%!test <*45507>
+%!testif ; ! ismac ()   <*45507>
+%! x = [1, -1, i, -i] .* 1e150;
+%! v = [0, 0, pi/2, -pi/2];
+%! assert (imag (asinh (x)), v);
+
+%!xtest <52627>
+%! ## Same test code as above, but intended only for test statistics on Mac.
+%! ## Mac trig/hyperbolic functions have huge tolerances.
+%! if (! ismac ()), return; endif
 %! x = [1, -1, i, -i] .* 1e150;
 %! v = [0, 0, pi/2, -pi/2];
 %! assert (imag (asinh (x)), v);