|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57457 - sandbox/SOC/2006/tree/trunk/libs/tree/test
From: ockham_at_[hidden]
Date: 2009-11-07 12:43:11
Author: bernhard.reiter
Date: 2009-11-07 12:43:10 EST (Sat, 07 Nov 2009)
New Revision: 57457
URL: http://svn.boost.org/trac/boost/changeset/57457
Log:
unbalance_binary_tree_test -> balance_test
Added:
sandbox/SOC/2006/tree/trunk/libs/tree/test/balance_test.cpp
- copied, changed from r57456, /sandbox/SOC/2006/tree/trunk/libs/tree/test/unbalanced_binary_tree_test.cpp
Removed:
sandbox/SOC/2006/tree/trunk/libs/tree/test/unbalanced_binary_tree_test.cpp
Text files modified:
sandbox/SOC/2006/tree/trunk/libs/tree/test/Jamfile.v2 | 2 +-
sandbox/SOC/2006/tree/trunk/libs/tree/test/balance_test.cpp | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/Jamfile.v2
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/Jamfile.v2 (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/Jamfile.v2 2009-11-07 12:43:10 EST (Sat, 07 Nov 2009)
@@ -49,6 +49,6 @@
[ run forest_test.cpp ]
# [ run nary_tree_test.cpp ]
[ run multiway_tree_test.cpp ]
- [ run unbalanced_binary_tree_test.cpp ]
+ [ run balance_test.cpp ]
# [ run graph_test.cpp ]
;
Copied: sandbox/SOC/2006/tree/trunk/libs/tree/test/balance_test.cpp (from r57456, /sandbox/SOC/2006/tree/trunk/libs/tree/test/unbalanced_binary_tree_test.cpp)
==============================================================================
--- /sandbox/SOC/2006/tree/trunk/libs/tree/test/unbalanced_binary_tree_test.cpp (original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/balance_test.cpp 2009-11-07 12:43:10 EST (Sat, 07 Nov 2009)
@@ -8,12 +8,12 @@
#include <boost/tree/detail/balancers/unbalanced.hpp>
#include <boost/tree/binary_tree.hpp>
-#define BOOST_TEST_MODULE unbalanced_binary_tree test
+#define BOOST_TEST_MODULE balance test
//#define BOOST_TEST_DYN_LINK
#include <boost/test/included/unit_test.hpp>
// TODO: Use a mock_binary_tree.
-BOOST_AUTO_TEST_CASE( unbalanced_binary_tree_constructors_test )
+BOOST_AUTO_TEST_CASE( balance_constructors_test )
{
using namespace boost::tree;
typedef binary_tree<int> tree_t;
@@ -23,7 +23,7 @@
balance_t t2(t1);
}
-BOOST_AUTO_TEST_CASE( unbalanced_binary_tree_iterator_test )
+BOOST_AUTO_TEST_CASE( balance_iterator_test )
{
using namespace boost::tree;
typedef binary_tree<int> tree_t;
@@ -33,7 +33,7 @@
balance_t::iterator it2(it1);
}
-BOOST_AUTO_TEST_CASE( unbalanced_binary_tree_test )
+BOOST_AUTO_TEST_CASE( balance_test )
{
using namespace boost::tree;
Deleted: sandbox/SOC/2006/tree/trunk/libs/tree/test/unbalanced_binary_tree_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/unbalanced_binary_tree_test.cpp 2009-11-07 12:43:10 EST (Sat, 07 Nov 2009)
+++ (empty file)
@@ -1,88 +0,0 @@
-// Copyright (c) 2006-2009, Bernhard Reiter
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/tree/balance.hpp>
-#include <boost/tree/detail/balancers/unbalanced.hpp>
-#include <boost/tree/binary_tree.hpp>
-
-#define BOOST_TEST_MODULE unbalanced_binary_tree test
-//#define BOOST_TEST_DYN_LINK
-#include <boost/test/included/unit_test.hpp>
-
-// TODO: Use a mock_binary_tree.
-BOOST_AUTO_TEST_CASE( unbalanced_binary_tree_constructors_test )
-{
- using namespace boost::tree;
- typedef binary_tree<int> tree_t;
- typedef balance<tree_t, balancers::unbalanced> balance_t;
- balance_t t1;
-
- balance_t t2(t1);
-}
-
-BOOST_AUTO_TEST_CASE( unbalanced_binary_tree_iterator_test )
-{
- using namespace boost::tree;
- typedef binary_tree<int> tree_t;
- typedef balance<tree_t, balancers::unbalanced> balance_t;
-
- balance_t::iterator it1;
- balance_t::iterator it2(it1);
-}
-
-BOOST_AUTO_TEST_CASE( unbalanced_binary_tree_test )
-{
- using namespace boost::tree;
-
- typedef binary_tree<int> tree_t;
- typedef balance<tree_t, balancers::unbalanced> balance_t;
- balance_t my_tree;
-
- balance_t::iterator c, c1, c2, c3, c4, c5;
-
- c = my_tree.end();
- BOOST_CHECK(c == my_tree.end());
- BOOST_CHECK(c == my_tree.begin());
-
- c1 = my_tree.insert(c, 8);
- BOOST_CHECK(c1 == my_tree.begin());
-
- BOOST_CHECK_EQUAL(*c1, 8);
-
- c1 = my_tree.insert(c1, 7);
- BOOST_CHECK_EQUAL(*c1, 7);
-
- ++c1;
- BOOST_CHECK_EQUAL(*c1, 8);
-
- ++c1;
- BOOST_CHECK(c1 == my_tree.end());
-
- c1 = my_tree.insert(my_tree.end(), 10);
- BOOST_CHECK_EQUAL(*c1, 10);
-
- --c1;
- BOOST_CHECK_EQUAL(*c1, 8);
-
- --c1;
- BOOST_CHECK_EQUAL(*c1, 7);
-
- c = my_tree.lower_bound(8);
- BOOST_CHECK_EQUAL(*c, 8);
-
- ++c;
- BOOST_CHECK_EQUAL(*c, 10);
- --c;
- BOOST_CHECK_EQUAL(*c, 8);
- --c;
- BOOST_CHECK_EQUAL(*c, 7);
- ++c;
- BOOST_CHECK_EQUAL(*c, 8);
- //c = my_tree.erase(c);
- --c;
- BOOST_CHECK_EQUAL(*c, 7);
-
-}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk