diff options
Diffstat (limited to 'libstdc++-v3/testsuite/util/regression/rand')
4 files changed, 39 insertions, 39 deletions
diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.tcc b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.tcc index 43cdb9f2b62..0f158664853 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.tcc +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.tcc @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -45,7 +45,7 @@ container_rand_regression_test(unsigned long seed, size_t n, size_t m, double mp, bool disp) : m_seed((seed == 0) ? twister_rand_gen::get_time_determined_seed() : seed), m_n(n), m_m(m), m_tp(tp), m_ip(ip), m_ep(ep), m_cp(cp), m_mp(mp), - m_disp(disp), m_p_c(NULL) + m_disp(disp), m_p_c(0) { } PB_DS_CLASS_T_DEC @@ -71,7 +71,7 @@ default_constructor() done = false; } - if (m_p_c != NULL) + if (m_p_c) PB_DS_COND_COMPARE(*m_p_c, m_native_c); return done; } @@ -98,7 +98,7 @@ copy_constructor() { PB_DS_TRACE("copy_constructor"); bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -124,7 +124,7 @@ assignment_operator() { PB_DS_TRACE("assignment operator"); bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -159,7 +159,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::cc_hash_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -226,7 +226,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::gp_hash_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -309,7 +309,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::tree_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -345,7 +345,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::list_update_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -370,7 +370,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::pat_trie_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -869,7 +869,7 @@ PB_DS_CLASS_C_DEC:: operator()() { typedef xml_result_set_regression_formatter formatter_type; - formatter_type* p_fmt = NULL; + formatter_type* p_fmt = 0; if (m_disp) p_fmt = new formatter_type(string_form<Cntnr>::name(), @@ -1591,30 +1591,30 @@ policy_access(__gnu_pbds::basic_hash_tag) { { typename Cntnr::hash_fn& r_t = m_p_c->get_hash_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::hash_fn& r_t =((const Cntnr& )*m_p_c).get_hash_fn(); - assert(&r_t != NULL); + assert(&r_t); } { typename Cntnr::eq_fn& r_t = m_p_c->get_eq_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::eq_fn& r_t =((const Cntnr& )*m_p_c).get_eq_fn(); - assert(&r_t != NULL); + assert(&r_t); } { typename Cntnr::resize_policy& r_t = m_p_c->get_resize_policy(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::resize_policy& r_t =((const Cntnr& )*m_p_c).get_resize_policy(); - assert(&r_t != NULL); + assert(&r_t); } } @@ -1627,12 +1627,12 @@ policy_access(__gnu_pbds::cc_hash_tag) { typename Cntnr::comb_hash_fn& r_t = m_p_c->get_comb_hash_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::comb_hash_fn& r_t =((const Cntnr& )*m_p_c).get_comb_hash_fn(); - assert(&r_t != NULL); + assert(&r_t); } } @@ -1645,21 +1645,21 @@ policy_access(__gnu_pbds::gp_hash_tag) { typename Cntnr::comb_probe_fn& r_t = m_p_c->get_comb_probe_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::comb_probe_fn& r_t =((const Cntnr& )*m_p_c).get_comb_probe_fn(); - assert(&r_t != NULL); + assert(&r_t); } { typename Cntnr::probe_fn& r_t = m_p_c->get_probe_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::probe_fn& r_t =((const Cntnr& )*m_p_c).get_probe_fn(); - assert(&r_t != NULL); + assert(&r_t); } } @@ -1670,12 +1670,12 @@ policy_access(__gnu_pbds::tree_tag) { { typename Cntnr::cmp_fn& r_t = m_p_c->get_cmp_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::cmp_fn& r_t =((const Cntnr& )*m_p_c).get_cmp_fn(); - assert(&r_t != NULL); + assert(&r_t); } } @@ -1691,7 +1691,7 @@ PB_DS_CLASS_C_DEC:: policy_access(__gnu_pbds::pat_trie_tag) { typename Cntnr::e_access_traits& r_t = m_p_c->get_e_access_traits(); - assert(&r_t != NULL); + assert(&r_t); } diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp index d4b395b126a..5f230495236 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -124,7 +124,7 @@ namespace detail }; // XXX RAII, constructor takes bool for display - xml_test_rand_regression_formatter* p_fmt = NULL; + xml_test_rand_regression_formatter* p_fmt = 0; if (disp) p_fmt = new xml_test_rand_regression_formatter(sd, n, m, tp, ip, ep, cp, mp); diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.tcc b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.tcc index f964911facb..e929f3533fe 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.tcc +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.tcc @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -45,7 +45,7 @@ container_rand_regression_test(unsigned long seed, size_t n, size_t m, double cp, double mp, bool disp) : m_seed(seed == 0 ? twister_rand_gen::get_time_determined_seed(): seed), m_n(n), m_m(m), m_tp(tp), m_ip(ip), m_dp(dp), m_ep(ep), m_cp(cp), - m_mp(mp), m_disp(disp), m_p_c(NULL) + m_mp(mp), m_disp(disp), m_p_c(0) { } PB_DS_CLASS_T_DEC @@ -71,7 +71,7 @@ default_constructor() done = false; } - if (m_p_c != NULL) + if (m_p_c) PB_DS_COND_COMPARE(*m_p_c, m_native_c); return done; @@ -99,7 +99,7 @@ copy_constructor() { PB_DS_TRACE("copy_constructor"); bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typedef typename allocator_type::group_adjustor adjustor; @@ -127,7 +127,7 @@ assignment_operator() { PB_DS_TRACE("assignment operator"); bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typedef typename allocator_type::group_adjustor adjustor; @@ -155,7 +155,7 @@ PB_DS_CLASS_C_DEC:: it_constructor() { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typedef typename allocator_type::group_adjustor adjustor; adjustor adjust(m_p_c->size()); @@ -242,7 +242,7 @@ PB_DS_CLASS_C_DEC:: operator()() { typedef xml_result_set_regression_formatter formatter_type; - formatter_type* p_fmt = NULL; + formatter_type* p_fmt = 0; if (m_disp) p_fmt = new formatter_type(string_form<Cntnr>::name(), string_form<Cntnr>::desc()); @@ -668,12 +668,12 @@ policy_access() { typename Cntnr::cmp_fn& r_t = m_p_c->get_cmp_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::cmp_fn& r_t =((const Cntnr& )*m_p_c).get_cmp_fn(); - assert(&r_t != NULL); + assert(&r_t); } } diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp index 1cf86020d45..37f8d51af74 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -123,7 +123,7 @@ namespace detail return -2; }; - xml_test_rand_regression_formatter* p_fmt = NULL; + xml_test_rand_regression_formatter* p_fmt = 0; if (sd == 0) sd = twister_rand_gen::get_time_determined_seed(); if (disp) |