[libcxx] r271919 - Rename some test data (and make it const) to rid us of some shadowing warnings in the test suite. No functional change. Thanks to STL at microsoft for the report and patch.
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 6 11:24:09 PDT 2016
Author: marshall
Date: Mon Jun 6 13:24:08 2016
New Revision: 271919
URL: http://llvm.org/viewvc/llvm-project?rev=271919&view=rev
Log:
Rename some test data (and make it const) to rid us of some shadowing warnings in the test suite. No functional change. Thanks to STL at microsoft for the report and patch.
Modified:
libcxx/trunk/test/std/numerics/complex.number/cases.h
libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/norm.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp
libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp
Modified: libcxx/trunk/test/std/numerics/complex.number/cases.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/cases.h?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/cases.h (original)
+++ libcxx/trunk/test/std/numerics/complex.number/cases.h Mon Jun 6 13:24:08 2016
@@ -17,7 +17,7 @@
#include <complex>
#include <cassert>
-std::complex<double> x[] =
+const std::complex<double> testcases[] =
{
std::complex<double>( 1.e-6, 1.e-6),
std::complex<double>(-1.e-6, 1.e-6),
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp Mon Jun 6 13:24:08 2016
@@ -37,16 +37,16 @@ test()
void test_edges()
{
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
for (unsigned j = 0; j < N; ++j)
{
- std::complex<double> r = x[i] / x[j];
- switch (classify(x[i]))
+ std::complex<double> r = testcases[i] / testcases[j];
+ switch (classify(testcases[i]))
{
case zero:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == NaN);
@@ -66,7 +66,7 @@ void test_edges()
}
break;
case non_zero:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == inf);
@@ -86,7 +86,7 @@ void test_edges()
}
break;
case inf:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == inf);
@@ -106,7 +106,7 @@ void test_edges()
}
break;
case NaN:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == NaN);
@@ -126,7 +126,7 @@ void test_edges()
}
break;
case non_zero_nan:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == inf);
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp Mon Jun 6 13:24:08 2016
@@ -39,16 +39,16 @@ test()
void test_edges()
{
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
for (unsigned j = 0; j < N; ++j)
{
- std::complex<double> r = x[i] * x[j];
- switch (classify(x[i]))
+ std::complex<double> r = testcases[i] * testcases[j];
+ switch (classify(testcases[i]))
{
case zero:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == zero);
@@ -68,7 +68,7 @@ void test_edges()
}
break;
case non_zero:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == zero);
@@ -88,7 +88,7 @@ void test_edges()
}
break;
case inf:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == NaN);
@@ -108,7 +108,7 @@ void test_edges()
}
break;
case NaN:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == NaN);
@@ -128,7 +128,7 @@ void test_edges()
}
break;
case non_zero_nan:
- switch (classify(x[j]))
+ switch (classify(testcases[j]))
{
case zero:
assert(classify(r) == NaN);
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,94 +36,94 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = acos(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = acos(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
is_about(r.real(), pi/2);
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) != std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) != std::signbit(r.imag()));
}
- else if (x[i].real() == 0 && std::isnan(x[i].imag()))
+ else if (testcases[i].real() == 0 && std::isnan(testcases[i].imag()))
{
is_about(r.real(), pi/2);
assert(std::isnan(r.imag()));
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
is_about(r.real(), pi/2);
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) != std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) != std::signbit(r.imag()));
}
- else if (std::isfinite(x[i].real()) && x[i].real() != 0 && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && testcases[i].real() != 0 && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isfinite(testcases[i].imag()))
{
is_about(r.real(), pi);
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) != std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) != std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isfinite(testcases[i].imag()))
{
assert(r.real() == 0);
assert(!std::signbit(r.real()));
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) != std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) != std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isinf(testcases[i].imag()))
{
is_about(r.real(), 0.75 * pi);
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) != std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) != std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isinf(testcases[i].imag()))
{
is_about(r.real(), 0.25 * pi);
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) != std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) != std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isinf(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) != std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) != std::signbit(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (!std::signbit(x[i].real()) && !std::signbit(x[i].imag()))
+ else if (!std::signbit(testcases[i].real()) && !std::signbit(testcases[i].imag()))
{
assert(!std::signbit(r.real()));
assert( std::signbit(r.imag()));
}
- else if (std::signbit(x[i].real()) && !std::signbit(x[i].imag()))
+ else if (std::signbit(testcases[i].real()) && !std::signbit(testcases[i].imag()))
{
assert(!std::signbit(r.real()));
assert( std::signbit(r.imag()));
}
- else if (std::signbit(x[i].real()) && std::signbit(x[i].imag()))
+ else if (std::signbit(testcases[i].real()) && std::signbit(testcases[i].imag()))
{
assert(!std::signbit(r.real()));
assert(!std::signbit(r.imag()));
}
- else if (!std::signbit(x[i].real()) && std::signbit(x[i].imag()))
+ else if (!std::signbit(testcases[i].real()) && std::signbit(testcases[i].imag()))
{
assert(!std::signbit(r.real()));
assert(!std::signbit(r.imag()));
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,91 +36,91 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = acosh(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = acosh(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
assert(!std::signbit(r.real()));
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi/2);
else
is_about(r.imag(), pi/2);
}
- else if (x[i].real() == 1 && x[i].imag() == 0)
+ else if (testcases[i].real() == 1 && testcases[i].imag() == 0)
{
assert(r.real() == 0);
assert(!std::signbit(r.real()));
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi/2);
else
is_about(r.imag(), pi/2);
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isfinite(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi);
else
is_about(r.imag(), pi);
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isfinite(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -0.75 * pi);
else
is_about(r.imag(), 0.75 * pi);
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -0.25 * pi);
else
is_about(r.imag(), 0.25 * pi);
}
- else if (std::isinf(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
@@ -128,7 +128,7 @@ void test_edges()
else
{
assert(!std::signbit(r.real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
}
}
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,77 +36,77 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = asin(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = asin(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
- assert(std::signbit(r.real()) == std::signbit(x[i].real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(r.real() == 0);
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if ( x[i].real() == 0 && std::isnan(x[i].imag()))
+ else if ( testcases[i].real() == 0 && std::isnan(testcases[i].imag()))
{
assert(r.real() == 0);
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
- if (x[i].real() > 0)
+ if (testcases[i].real() > 0)
is_about(r.real(), pi/2);
else
is_about(r.real(), - pi/2);
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
- if (std::signbit(x[i].real()))
+ if (std::signbit(testcases[i].real()))
is_about(r.real(), -pi/4);
else
is_about(r.real(), pi/4);
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].real()) != std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].real()) != std::signbit(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isinf(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
else
{
- assert(std::signbit(r.real()) == std::signbit(x[i].real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
}
}
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,76 +36,76 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = asinh(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = asinh(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
- assert(std::signbit(r.real()) == std::signbit(x[i].real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
- if (std::signbit(x[i].imag()))
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi/2);
else
is_about(r.imag(), pi/2);
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isinf(r.real()));
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
- if (std::signbit(x[i].imag()))
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi/4);
else
is_about(r.imag(), pi/4);
}
- else if (std::isinf(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isinf(r.real()));
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && x[i].imag() == 0)
+ else if (std::isnan(testcases[i].real()) && testcases[i].imag() == 0)
{
assert(std::isnan(r.real()));
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
else
{
- assert(std::signbit(r.real()) == std::signbit(x[i].real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
}
}
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp Mon Jun 6 13:24:08 2016
@@ -35,11 +35,11 @@ test()
void test_edges()
{
typedef std::complex<double> C;
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = atan(x[i]);
- std::complex<double> t1(-imag(x[i]), real(x[i]));
+ std::complex<double> r = atan(testcases[i]);
+ std::complex<double> t1(-imag(testcases[i]), real(testcases[i]));
std::complex<double> t2 = atanh(t1);
std::complex<double> z(imag(t2), -real(t2));
if (std::isnan(real(r)))
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,89 +36,89 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = atanh(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = atanh(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
- assert(std::signbit(r.real()) == std::signbit(x[i].real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if ( x[i].real() == 0 && std::isnan(x[i].imag()))
+ else if ( testcases[i].real() == 0 && std::isnan(testcases[i].imag()))
{
assert(r.real() == 0);
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::abs(x[i].real()) == 1 && x[i].imag() == 0)
+ else if (std::abs(testcases[i].real()) == 1 && testcases[i].imag() == 0)
{
assert(std::isinf(r.real()));
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(r.real() == 0);
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
- if (x[i].imag() > 0)
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
+ if (testcases[i].imag() > 0)
is_about(r.imag(), pi/2);
else
is_about(r.imag(), -pi/2);
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(r.real() == 0);
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
- if (std::signbit(x[i].imag()))
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi/2);
else
is_about(r.imag(), pi/2);
}
- else if (std::isinf(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(r.real() == 0);
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
- if (std::signbit(x[i].imag()))
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi/2);
else
is_about(r.imag(), pi/2);
}
- else if (std::isinf(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(r.real() == 0);
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(r.real() == 0);
- assert(std::signbit(x[i].real()) == std::signbit(r.real()));
- if (std::signbit(x[i].imag()))
+ assert(std::signbit(testcases[i].real()) == std::signbit(r.real()));
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi/2);
else
is_about(r.imag(), pi/2);
}
- else if (std::isnan(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
else
{
- assert(std::signbit(r.real()) == std::signbit(x[i].real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
}
}
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,11 +36,11 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = cos(x[i]);
- std::complex<double> t1(-imag(x[i]), real(x[i]));
+ std::complex<double> r = cos(testcases[i]);
+ std::complex<double> t1(-imag(testcases[i]), real(testcases[i]));
std::complex<double> z = cosh(t1);
if (std::isnan(real(r)))
assert(std::isnan(real(z)));
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,72 +36,72 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = cosh(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = cosh(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
assert(r.real() == 1);
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (x[i].real() == 0 && std::isinf(x[i].imag()))
+ else if (testcases[i].real() == 0 && std::isinf(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(r.imag() == 0);
}
- else if (x[i].real() == 0 && std::isnan(x[i].imag()))
+ else if (testcases[i].real() == 0 && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(r.imag() == 0);
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].imag() == 0)
+ else if (std::isinf(testcases[i].real()) && testcases[i].imag() == 0)
{
assert(std::isinf(r.real()));
assert(!std::signbit(r.real()));
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isinf(r.real()));
- assert(std::signbit(r.real()) == std::signbit(cos(x[i].imag())));
+ assert(std::signbit(r.real()) == std::signbit(cos(testcases[i].imag())));
assert(std::isinf(r.imag()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].real() * sin(x[i].imag())));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].real() * sin(testcases[i].imag())));
}
- else if (std::isinf(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && x[i].imag() == 0)
+ else if (std::isnan(testcases[i].real()) && testcases[i].imag() == 0)
{
assert(std::isnan(r.real()));
assert(r.imag() == 0);
}
- else if (std::isnan(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/exp.pass.cpp Mon Jun 6 13:24:08 2016
@@ -34,73 +34,73 @@ test()
void test_edges()
{
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = exp(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = exp(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
assert(r.real() == 1.0);
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && x[i].imag() == 0)
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && testcases[i].imag() == 0)
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isinf(testcases[i].imag()))
{
assert(r.real() == 0);
assert(r.imag() == 0);
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isnan(testcases[i].imag()))
{
assert(r.real() == 0);
assert(r.imag() == 0);
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isnan(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && x[i].imag() == 0)
+ else if (std::isnan(testcases[i].real()) && testcases[i].imag() == 0)
{
assert(std::isnan(r.real()));
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isnan(x[i].real()) && x[i].imag() != 0)
+ else if (std::isnan(testcases[i].real()) && testcases[i].imag() != 0)
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isfinite(x[i].imag()) && std::abs(x[i].imag()) <= 1)
+ else if (std::isfinite(testcases[i].imag()) && std::abs(testcases[i].imag()) <= 1)
{
assert(!std::signbit(r.real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
}
}
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log.pass.cpp Mon Jun 6 13:24:08 2016
@@ -35,17 +35,17 @@ test()
void test_edges()
{
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = log(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = log(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
- if (std::signbit(x[i].real()))
+ if (std::signbit(testcases[i].real()))
{
assert(std::isinf(r.real()));
assert(r.real() < 0);
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi);
else
is_about(r.imag(), pi);
@@ -55,24 +55,24 @@ void test_edges()
assert(std::isinf(r.real()));
assert(r.real() < 0);
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
- if (x[i].imag() > 0)
+ if (testcases[i].imag() > 0)
is_about(r.imag(), pi/2);
else
is_about(r.imag(), -pi/2);
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isfinite(testcases[i].imag()))
{
assert(std::isinf(r.real()) && r.real() > 0);
if (r.imag() > 0)
@@ -80,44 +80,44 @@ void test_edges()
else
is_about(r.imag(), -pi);
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isfinite(testcases[i].imag()))
{
assert(std::isinf(r.real()) && r.real() > 0);
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (x[i].real() == 1 && x[i].imag() == 0)
+ else if (testcases[i].real() == 1 && testcases[i].imag() == 0)
{
assert(r.real() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (x[i].real() == 0 && x[i].imag() == 1)
+ else if (testcases[i].real() == 0 && testcases[i].imag() == 1)
{
assert(r.real() == 0);
is_about(r.imag(), pi/2);
}
- else if (x[i].real() == -1 && x[i].imag() == 0)
+ else if (testcases[i].real() == -1 && testcases[i].imag() == 0)
{
assert(r.real() == 0);
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r.imag(), -pi);
else
is_about(r.imag(), pi);
}
- else if (x[i].real() == 0 && x[i].imag() == -1)
+ else if (testcases[i].real() == 0 && testcases[i].imag() == -1)
{
assert(r.real() == 0);
is_about(r.imag(), -pi/2);
}
- else if (std::isfinite(x[i].real()) && std::isfinite(x[i].imag()) && abs(x[i]) < 1)
+ else if (std::isfinite(testcases[i].real()) && std::isfinite(testcases[i].imag()) && abs(testcases[i]) < 1)
{
assert( std::signbit(r.real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isfinite(x[i].real()) && std::isfinite(x[i].imag()) && abs(x[i]) > 1)
+ else if (std::isfinite(testcases[i].real()) && std::isfinite(testcases[i].imag()) && abs(testcases[i]) > 1)
{
assert(!std::signbit(r.real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
}
}
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/log10.pass.cpp Mon Jun 6 13:24:08 2016
@@ -35,11 +35,11 @@ test()
void test_edges()
{
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = log10(x[i]);
- std::complex<double> z = log(x[i])/std::log(10);
+ std::complex<double> r = log10(testcases[i]);
+ std::complex<double> z = log(testcases[i])/std::log(10);
if (std::isnan(real(r)))
assert(std::isnan(real(z)));
else
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp Mon Jun 6 13:24:08 2016
@@ -37,13 +37,13 @@ test()
void test_edges()
{
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
for (unsigned j = 0; j < N; ++j)
{
- std::complex<double> r = pow(x[i], x[j]);
- std::complex<double> z = exp(x[j] * log(x[i]));
+ std::complex<double> r = pow(testcases[i], testcases[j]);
+ std::complex<double> z = exp(testcases[j] * log(testcases[i]));
if (std::isnan(real(r)))
assert(std::isnan(real(z)));
else
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp Mon Jun 6 13:24:08 2016
@@ -37,13 +37,13 @@ test()
void test_edges()
{
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
for (unsigned j = 0; j < N; ++j)
{
- std::complex<double> r = pow(x[i], real(x[j]));
- std::complex<double> z = exp(std::complex<double>(real(x[j])) * log(x[i]));
+ std::complex<double> r = pow(testcases[i], real(testcases[j]));
+ std::complex<double> z = exp(std::complex<double>(real(testcases[j])) * log(testcases[i]));
if (std::isnan(real(r)))
assert(std::isnan(real(z)));
else
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp Mon Jun 6 13:24:08 2016
@@ -37,13 +37,13 @@ test()
void test_edges()
{
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
for (unsigned j = 0; j < N; ++j)
{
- std::complex<double> r = pow(real(x[i]), x[j]);
- std::complex<double> z = exp(x[j] * log(std::complex<double>(real(x[i]))));
+ std::complex<double> r = pow(real(testcases[i]), testcases[j]);
+ std::complex<double> z = exp(testcases[j] * log(std::complex<double>(real(testcases[i]))));
if (std::isnan(real(r)))
assert(std::isnan(real(z)));
else
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,11 +36,11 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = sin(x[i]);
- std::complex<double> t1(-imag(x[i]), real(x[i]));
+ std::complex<double> r = sin(testcases[i]);
+ std::complex<double> t1(-imag(testcases[i]), real(testcases[i]));
std::complex<double> t2 = sinh(t1);
std::complex<double> z(imag(t2), -real(t2));
if (std::isnan(real(r)))
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,73 +36,73 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = sinh(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = sinh(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
assert(r.real() == 0);
- assert(std::signbit(r.real()) == std::signbit(x[i].real()));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (x[i].real() == 0 && std::isinf(x[i].imag()))
+ else if (testcases[i].real() == 0 && std::isinf(testcases[i].imag()))
{
assert(r.real() == 0);
assert(std::isnan(r.imag()));
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (x[i].real() == 0 && std::isnan(x[i].imag()))
+ else if (testcases[i].real() == 0 && std::isnan(testcases[i].imag()))
{
assert(r.real() == 0);
assert(std::isnan(r.imag()));
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].imag() == 0)
+ else if (std::isinf(testcases[i].real()) && testcases[i].imag() == 0)
{
assert(std::isinf(r.real()));
- assert(std::signbit(r.real()) == std::signbit(x[i].real()));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isinf(r.real()));
- assert(std::signbit(r.real()) == std::signbit(x[i].real() * cos(x[i].imag())));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real() * cos(testcases[i].imag())));
assert(std::isinf(r.imag()));
- assert(std::signbit(r.imag()) == std::signbit(sin(x[i].imag())));
+ assert(std::signbit(r.imag()) == std::signbit(sin(testcases[i].imag())));
}
- else if (std::isinf(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && x[i].imag() == 0)
+ else if (std::isnan(testcases[i].real()) && testcases[i].imag() == 0)
{
assert(std::isnan(r.real()));
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isnan(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,58 +36,58 @@ test()
void test_edges()
{
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = sqrt(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = sqrt(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
assert(!std::signbit(r.real()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
assert(std::isinf(r.imag()));
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isfinite(testcases[i].imag()))
{
assert(r.real() == 0);
assert(!std::signbit(r.real()));
assert(std::isinf(r.imag()));
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isfinite(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
assert(r.imag() == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r.imag()));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() < 0 && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() < 0 && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isinf(r.imag()));
}
- else if (std::isinf(x[i].real()) && x[i].real() > 0 && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && testcases[i].real() > 0 && std::isnan(testcases[i].imag()))
{
assert(std::isinf(r.real()));
assert(r.real() > 0);
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && (std::isfinite(x[i].imag()) || std::isnan(x[i].imag())))
+ else if (std::isnan(testcases[i].real()) && (std::isfinite(testcases[i].imag()) || std::isnan(testcases[i].imag())))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::signbit(x[i].imag()))
+ else if (std::signbit(testcases[i].imag()))
{
assert(!std::signbit(r.real()));
assert(std::signbit(r.imag()));
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp Mon Jun 6 13:24:08 2016
@@ -37,11 +37,11 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = tan(x[i]);
- std::complex<double> t1(-imag(x[i]), real(x[i]));
+ std::complex<double> r = tan(testcases[i]);
+ std::complex<double> t1(-imag(testcases[i]), real(testcases[i]));
std::complex<double> t2 = tanh(t1);
std::complex<double> z(imag(t2), -real(t2));
if (std::isnan(real(r)))
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp Mon Jun 6 13:24:08 2016
@@ -36,55 +36,55 @@ void test_edges()
{
typedef std::complex<double> C;
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = tanh(x[i]);
- if (x[i].real() == 0 && x[i].imag() == 0)
+ std::complex<double> r = tanh(testcases[i]);
+ if (testcases[i].real() == 0 && testcases[i].imag() == 0)
{
assert(r.real() == 0);
- assert(std::signbit(r.real()) == std::signbit(x[i].real()));
+ assert(std::signbit(r.real()) == std::signbit(testcases[i].real()));
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isfinite(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isfinite(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isfinite(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isinf(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(r.real() == 1);
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(sin(2*x[i].imag())));
+ assert(std::signbit(r.imag()) == std::signbit(sin(2*testcases[i].imag())));
}
- else if (std::isinf(x[i].real()) && std::isinf(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
assert(r.real() == 1);
assert(r.imag() == 0);
}
- else if (std::isinf(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isinf(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(r.real() == 1);
assert(r.imag() == 0);
}
- else if (std::isnan(x[i].real()) && x[i].imag() == 0)
+ else if (std::isnan(testcases[i].real()) && testcases[i].imag() == 0)
{
assert(std::isnan(r.real()));
assert(r.imag() == 0);
- assert(std::signbit(r.imag()) == std::signbit(x[i].imag()));
+ assert(std::signbit(r.imag()) == std::signbit(testcases[i].imag()));
}
- else if (std::isnan(x[i].real()) && std::isfinite(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isfinite(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
}
- else if (std::isnan(x[i].real()) && std::isnan(x[i].imag()))
+ else if (std::isnan(testcases[i].real()) && std::isnan(testcases[i].imag()))
{
assert(std::isnan(r.real()));
assert(std::isnan(r.imag()));
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/abs.pass.cpp Mon Jun 6 13:24:08 2016
@@ -28,11 +28,11 @@ test()
void test_edges()
{
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- double r = abs(x[i]);
- switch (classify(x[i]))
+ double r = abs(testcases[i]);
+ switch (classify(testcases[i]))
{
case zero:
assert(r == 0);
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/arg.pass.cpp Mon Jun 6 13:24:08 2016
@@ -29,42 +29,42 @@ test()
void test_edges()
{
const double pi = std::atan2(+0., -0.);
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- double r = arg(x[i]);
- if (std::isnan(x[i].real()) || std::isnan(x[i].imag()))
+ double r = arg(testcases[i]);
+ if (std::isnan(testcases[i].real()) || std::isnan(testcases[i].imag()))
assert(std::isnan(r));
else
{
- switch (classify(x[i]))
+ switch (classify(testcases[i]))
{
case zero:
- if (std::signbit(x[i].real()))
+ if (std::signbit(testcases[i].real()))
{
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r, -pi);
else
is_about(r, pi);
}
else
{
- assert(std::signbit(x[i].imag()) == std::signbit(r));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r));
}
break;
case non_zero:
- if (x[i].real() == 0)
+ if (testcases[i].real() == 0)
{
- if (x[i].imag() < 0)
+ if (testcases[i].imag() < 0)
is_about(r, -pi/2);
else
is_about(r, pi/2);
}
- else if (x[i].imag() == 0)
+ else if (testcases[i].imag() == 0)
{
- if (x[i].real() < 0)
+ if (testcases[i].real() < 0)
{
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r, -pi);
else
is_about(r, pi);
@@ -72,37 +72,37 @@ void test_edges()
else
{
assert(r == 0);
- assert(std::signbit(x[i].imag()) == std::signbit(r));
+ assert(std::signbit(testcases[i].imag()) == std::signbit(r));
}
}
- else if (x[i].imag() > 0)
+ else if (testcases[i].imag() > 0)
assert(r > 0);
else
assert(r < 0);
break;
case inf:
- if (std::isinf(x[i].real()) && std::isinf(x[i].imag()))
+ if (std::isinf(testcases[i].real()) && std::isinf(testcases[i].imag()))
{
- if (x[i].real() < 0)
+ if (testcases[i].real() < 0)
{
- if (x[i].imag() > 0)
+ if (testcases[i].imag() > 0)
is_about(r, 0.75 * pi);
else
is_about(r, -0.75 * pi);
}
else
{
- if (x[i].imag() > 0)
+ if (testcases[i].imag() > 0)
is_about(r, 0.25 * pi);
else
is_about(r, -0.25 * pi);
}
}
- else if (std::isinf(x[i].real()))
+ else if (std::isinf(testcases[i].real()))
{
- if (x[i].real() < 0)
+ if (testcases[i].real() < 0)
{
- if (std::signbit(x[i].imag()))
+ if (std::signbit(testcases[i].imag()))
is_about(r, -pi);
else
is_about(r, pi);
@@ -110,12 +110,12 @@ void test_edges()
else
{
assert(r == 0);
- assert(std::signbit(r) == std::signbit(x[i].imag()));
+ assert(std::signbit(r) == std::signbit(testcases[i].imag()));
}
}
else
{
- if (x[i].imag() < 0)
+ if (testcases[i].imag() < 0)
is_about(r, -pi/2);
else
is_about(r, pi/2);
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/norm.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/norm.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/norm.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/norm.pass.cpp Mon Jun 6 13:24:08 2016
@@ -28,11 +28,11 @@ test()
void test_edges()
{
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- double r = norm(x[i]);
- switch (classify(x[i]))
+ double r = norm(testcases[i]);
+ switch (classify(testcases[i]))
{
case zero:
assert(r == 0);
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp Mon Jun 6 13:24:08 2016
@@ -46,11 +46,11 @@ test()
void test_edges()
{
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- double r = real(x[i]);
- double theta = imag(x[i]);
+ double r = real(testcases[i]);
+ double theta = imag(testcases[i]);
std::complex<double> z = std::polar(r, theta);
switch (classify(r))
{
Modified: libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp?rev=271919&r1=271918&r2=271919&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/proj.pass.cpp Mon Jun 6 13:24:08 2016
@@ -37,26 +37,26 @@ test()
void test_edges()
{
- const unsigned N = sizeof(x) / sizeof(x[0]);
+ const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
for (unsigned i = 0; i < N; ++i)
{
- std::complex<double> r = proj(x[i]);
- switch (classify(x[i]))
+ std::complex<double> r = proj(testcases[i]);
+ switch (classify(testcases[i]))
{
case zero:
case non_zero:
- assert(r == x[i]);
- assert(std::signbit(real(r)) == std::signbit(real(x[i])));
- assert(std::signbit(imag(r)) == std::signbit(imag(x[i])));
+ assert(r == testcases[i]);
+ assert(std::signbit(real(r)) == std::signbit(real(testcases[i])));
+ assert(std::signbit(imag(r)) == std::signbit(imag(testcases[i])));
break;
case inf:
assert(std::isinf(real(r)) && real(r) > 0);
assert(imag(r) == 0);
- assert(std::signbit(imag(r)) == std::signbit(imag(x[i])));
+ assert(std::signbit(imag(r)) == std::signbit(imag(testcases[i])));
break;
case NaN:
case non_zero_nan:
- assert(classify(r) == classify(x[i]));
+ assert(classify(r) == classify(testcases[i]));
break;
}
}
More information about the cfe-commits
mailing list