This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[patch] Fix std::polar() test FAIL
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Jun 2015 16:11:14 +0100
- Subject: [patch] Fix std::polar() test FAIL
- Authentication-results: sourceware.org; auth=none
I recently added a debug mode assertion that std::polar is not called
with a negative rho argument, which this test does.
Tested powerpc64le-linux, committed to trunk.
commit 3592c4a31ba7f3af4eb8111565888651652ad7b1
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Jun 22 15:08:55 2015 +0100
* testsuite/26_numerics/complex/value_operations/1.cc: Use
non-negative rho argument.
diff --git a/libstdc++-v3/testsuite/26_numerics/complex/value_operations/1.cc b/libstdc++-v3/testsuite/26_numerics/complex/value_operations/1.cc
index 1caf9f1..a1e0a6b 100644
--- a/libstdc++-v3/testsuite/26_numerics/complex/value_operations/1.cc
+++ b/libstdc++-v3/testsuite/26_numerics/complex/value_operations/1.cc
@@ -53,7 +53,7 @@ void test01()
complex_type e __attribute__((unused)) = conj(c);
- complex_type f = polar(c.imag(), 0.0);
+ complex_type f = polar(std::abs(c.imag()), 0.0);
VERIFY( f.real() != 0 );
}