# HG changeset patch # User Rik # Date 1515435924 28800 # Node ID 0645853d12d6ce26fc2ef57eb4fc53368f714a4b # Parent cd42d0f341db125a5ae8234c02b33f641890d2a8 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. diff -r cd42d0f341db -r 0645853d12d6 libinterp/corefcn/dlmread.cc --- a/libinterp/corefcn/dlmread.cc Sun Jan 07 21:40:34 2018 -0800 +++ b/libinterp/corefcn/dlmread.cc Mon Jan 08 10:25:24 2018 -0800 @@ -593,7 +593,27 @@ %! unlink (file); %! end_unwind_protect -%!test <*50589> +%!testif ; ! ismac () <*50589> +%! file = tempname (); +%! unwind_protect +%! fid = fopen (file, "wt"); +%! fwrite (fid, "1;2;3\n"); +%! fwrite (fid, "1i;2I;3j;4J\n"); +%! fwrite (fid, "4;5;6\n"); +%! fwrite (fid, "-4i;+5I;-6j;+7J\n"); +%! fclose (fid); +%! +%! assert (dlmread (file), [1, 2, 3, 0; 1i, 2i, 3i, 4i; +%! 4, 5, 6, 0; -4i, 5i, -6i, 7i]); +%! assert (dlmread (file, "", [0 0 0 3]), [1, 2, 3]); +%! assert (dlmread (file, "", [1 0 1 3]), [1i, 2i, 3i, 4i]); +%! unwind_protect_cleanup +%! unlink (file); +%! end_unwind_protect + +%!xtest <47413> +%! ## Same test code as above, but intended only for test statistics on Mac. +%! if (! ismac ()), return; endif %! file = tempname (); %! unwind_protect %! fid = fopen (file, "wt"); diff -r cd42d0f341db -r 0645853d12d6 libinterp/corefcn/mappers.cc --- 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);