complexity.cc: Add missing test variable.
2014-10-23 François Dumont <fdumont@gcc.gnu.org> * 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
This commit is contained in:
parent
41b9329e73
commit
fc3f28640a
5 changed files with 26 additions and 3 deletions
|
@ -1,3 +1,13 @@
|
|||
2014-10-23 François Dumont <fdumont@gcc.gnu.org>
|
||||
|
||||
* 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 <jwakely@redhat.com>
|
||||
|
||||
* doc/xml/manual/status_cxx2011.xml: Update status.
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
void test01()
|
||||
{
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
using __gnu_test::counter_type;
|
||||
const std::size_t nb_values = 1000;
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-require-normal-mode "" }
|
||||
// { dg-require-cmath "" }
|
||||
// { dg-options "-std=gnu++11" }
|
||||
|
||||
#include <cmath>
|
||||
|
@ -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()
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-require-normal-mode "" }
|
||||
// { dg-require-cmath "" }
|
||||
// { dg-options "-std=gnu++11" }
|
||||
|
||||
#include <cmath>
|
||||
|
@ -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()
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-require-cmath "" }
|
||||
// { dg-options "-std=gnu++11" }
|
||||
|
||||
#include <cmath>
|
||||
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue