diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:21:10 +0000 |
commit | 1c3313bd0215c89fb38710a1ea0762ccf32e859c (patch) | |
tree | 65e6d33ca6254b41a8f4230edff47c5344dbd019 /test/std/numerics/complex.number | |
parent | 0dc0969cd0a732760f0aa79942a04e0eaef297c4 (diff) |
Notes
Diffstat (limited to 'test/std/numerics/complex.number')
12 files changed, 34 insertions, 10 deletions
diff --git a/test/std/numerics/complex.number/complex.literals/literals.pass.cpp b/test/std/numerics/complex.number/complex.literals/literals.pass.cpp index a2e53629f97dc..8831ca1d6ee14 100644 --- a/test/std/numerics/complex.number/complex.literals/literals.pass.cpp +++ b/test/std/numerics/complex.number/complex.literals/literals.pass.cpp @@ -14,6 +14,8 @@ #include <type_traits> #include <cassert> +#include "test_macros.h" + int main() { using namespace std::literals::complex_literals; diff --git a/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp b/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp index 67e0fa131fd00..6cc911d4e5e61 100644 --- a/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp +++ b/test/std/numerics/complex.number/complex.literals/literals1.fail.cpp @@ -12,6 +12,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { std::complex<float> foo = 1.0if; // should fail w/conversion operator not found diff --git a/test/std/numerics/complex.number/complex.members/construct.pass.cpp b/test/std/numerics/complex.number/complex.members/construct.pass.cpp index b4d870fad11ea..25b9ce62cc1d5 100644 --- a/test/std/numerics/complex.number/complex.members/construct.pass.cpp +++ b/test/std/numerics/complex.number/complex.members/construct.pass.cpp @@ -14,6 +14,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + template <class T> void test() @@ -38,7 +40,7 @@ test() assert(c.real() == 10.5); assert(c.imag() == -9.5); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<T> c; static_assert(c.real() == 0, ""); diff --git a/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp index e8d07ce287d09..ac26e3c9eeda1 100644 --- a/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp +++ b/test/std/numerics/complex.number/complex.special/double_float_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<float> cd(2.5, 3.5); constexpr std::complex<double> cf(cd); diff --git a/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp b/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp index 298aaa3a7a8a2..3bb01ac465009 100644 --- a/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp +++ b/test/std/numerics/complex.number/complex.special/double_float_implicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<float> cd(2.5, 3.5); constexpr std::complex<double> cf = cd; diff --git a/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp index 6ff74a2cdef36..97c2580249ca3 100644 --- a/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp +++ b/test/std/numerics/complex.number/complex.special/double_long_double_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<long double> cd(2.5, 3.5); constexpr std::complex<double> cf(cd); diff --git a/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp index 77ca9d7f2aac3..3027d4cdcc0cf 100644 --- a/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp +++ b/test/std/numerics/complex.number/complex.special/float_double_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<double> cd(2.5, 3.5); constexpr std::complex<float> cf(cd); diff --git a/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp index 4fb11b4ca27c2..515e83dfc46e6 100644 --- a/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp +++ b/test/std/numerics/complex.number/complex.special/float_long_double_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<long double> cd(2.5, 3.5); constexpr std::complex<float> cf(cd); diff --git a/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp index dd10c808b90ae..4f24a1c6575d4 100644 --- a/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp +++ b/test/std/numerics/complex.number/complex.special/long_double_double_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<double> cd(2.5, 3.5); constexpr std::complex<long double> cf(cd); diff --git a/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp b/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp index aab539407d0f7..8cbd7a8a12cd9 100644 --- a/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp +++ b/test/std/numerics/complex.number/complex.special/long_double_double_implicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<double> cd(2.5, 3.5); constexpr std::complex<long double> cf = cd; diff --git a/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp b/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp index a5f5101c4dc84..7930548f9f38b 100644 --- a/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp +++ b/test/std/numerics/complex.number/complex.special/long_double_float_explicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<float> cd(2.5, 3.5); constexpr std::complex<long double> cf(cd); diff --git a/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp b/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp index 25b93823f6ed2..22b9fd08ac252 100644 --- a/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp +++ b/test/std/numerics/complex.number/complex.special/long_double_float_implicit.pass.cpp @@ -18,6 +18,8 @@ #include <complex> #include <cassert> +#include "test_macros.h" + int main() { { @@ -26,7 +28,7 @@ int main() assert(cf.real() == cd.real()); assert(cf.imag() == cd.imag()); } -#ifndef _LIBCPP_HAS_NO_CONSTEXPR +#if TEST_STD_VER >= 11 { constexpr std::complex<float> cd(2.5, 3.5); constexpr std::complex<long double> cf = cd; |