From fc3f28640aa9a1343ddc227c20147589a57e2f26 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Dumont?= Date: Thu, 23 Oct 2014 22:03:49 +0000 Subject: [PATCH] complexity.cc: Add missing test variable. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2014-10-23 François Dumont * testsuite/25_algorithms/make_heap/complexity.cc: Add missing test variable. * testsuite/25_algorithms/sort_heap/complexity.cc: Likewise and use log2. Now require cmath support. * testsuite/25_algorithms/pop_heap/complexity.cc: Likewise and require normal mode. * testsuite/25_algorithms/push_heap/complexity.cc: Likewise. From-SVN: r216601 --- libstdc++-v3/ChangeLog | 10 ++++++++++ .../testsuite/25_algorithms/make_heap/complexity.cc | 2 ++ .../testsuite/25_algorithms/pop_heap/complexity.cc | 6 +++++- .../testsuite/25_algorithms/push_heap/complexity.cc | 6 +++++- .../testsuite/25_algorithms/sort_heap/complexity.cc | 5 ++++- 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1495a6e83d2..0e230ca40d2 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +2014-10-23 François Dumont + + * testsuite/25_algorithms/make_heap/complexity.cc: Add missing test + variable. + * testsuite/25_algorithms/sort_heap/complexity.cc: Likewise and use + log2. Now require cmath support. + * testsuite/25_algorithms/pop_heap/complexity.cc: Likewise and require + normal mode. + * testsuite/25_algorithms/push_heap/complexity.cc: Likewise. + 2014-10-23 Jonathan Wakely * doc/xml/manual/status_cxx2011.xml: Update status. diff --git a/libstdc++-v3/testsuite/25_algorithms/make_heap/complexity.cc b/libstdc++-v3/testsuite/25_algorithms/make_heap/complexity.cc index cfe1a7a659f..97c1df343f2 100644 --- a/libstdc++-v3/testsuite/25_algorithms/make_heap/complexity.cc +++ b/libstdc++-v3/testsuite/25_algorithms/make_heap/complexity.cc @@ -26,6 +26,8 @@ void test01() { + bool test __attribute__((unused)) = true; + using __gnu_test::counter_type; const std::size_t nb_values = 1000; diff --git a/libstdc++-v3/testsuite/25_algorithms/pop_heap/complexity.cc b/libstdc++-v3/testsuite/25_algorithms/pop_heap/complexity.cc index 75ed37e665e..dea99ca3b98 100644 --- a/libstdc++-v3/testsuite/25_algorithms/pop_heap/complexity.cc +++ b/libstdc++-v3/testsuite/25_algorithms/pop_heap/complexity.cc @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // . +// { dg-require-normal-mode "" } +// { dg-require-cmath "" } // { dg-options "-std=gnu++11" } #include @@ -27,6 +29,8 @@ void test01() { + bool test __attribute__((unused)) = true; + using __gnu_test::counter_type; const std::size_t nb_values = 1000; @@ -43,7 +47,7 @@ void test01() std::pop_heap(values.begin(), values.end()); - VERIFY( counter_type::less_compare_count <= 2.0 * std::log(nb_values) ); + VERIFY( counter_type::less_compare_count <= 2.0 * std::log2(nb_values) ); } int main() diff --git a/libstdc++-v3/testsuite/25_algorithms/push_heap/complexity.cc b/libstdc++-v3/testsuite/25_algorithms/push_heap/complexity.cc index 90c445710cc..a110b0fd232 100644 --- a/libstdc++-v3/testsuite/25_algorithms/push_heap/complexity.cc +++ b/libstdc++-v3/testsuite/25_algorithms/push_heap/complexity.cc @@ -15,6 +15,8 @@ // with this library; see the file COPYING3. If not see // . +// { dg-require-normal-mode "" } +// { dg-require-cmath "" } // { dg-options "-std=gnu++11" } #include @@ -27,6 +29,8 @@ void test01() { + bool test __attribute__((unused)) = true; + using __gnu_test::counter_type; const std::size_t nb_values = 1000; @@ -44,7 +48,7 @@ void test01() std::push_heap(values.begin(), values.end()); - VERIFY( counter_type::less_compare_count <= std::log(values.size()) ); + VERIFY( counter_type::less_compare_count <= std::log2(values.size()) ); } int main() diff --git a/libstdc++-v3/testsuite/25_algorithms/sort_heap/complexity.cc b/libstdc++-v3/testsuite/25_algorithms/sort_heap/complexity.cc index b847e279aec..34de48e150b 100644 --- a/libstdc++-v3/testsuite/25_algorithms/sort_heap/complexity.cc +++ b/libstdc++-v3/testsuite/25_algorithms/sort_heap/complexity.cc @@ -15,6 +15,7 @@ // with this library; see the file COPYING3. If not see // . +// { dg-require-cmath "" } // { dg-options "-std=gnu++11" } #include @@ -27,6 +28,8 @@ void test01() { + bool test __attribute__((unused)) = true; + using __gnu_test::counter_type; const std::size_t nb_values = 1000; @@ -43,7 +46,7 @@ void test01() std::sort_heap(values.begin(), values.end()); - VERIFY( counter_type::less_compare_count <= 2.0 * nb_values * std::log(nb_values) ); + VERIFY( counter_type::less_compare_count <= 2.0 * nb_values * std::log2(nb_values) ); } int main() -- 2.30.2