summaryrefslogtreecommitdiffhomepage
path: root/test/rope_test
diff options
context:
space:
mode:
Diffstat (limited to 'test/rope_test')
-rw-r--r--test/rope_test/Jamfile.v28
-rw-r--r--test/rope_test/crope.pred.test.cpp17
-rw-r--r--test/rope_test/crope.test.cpp1
3 files changed, 18 insertions, 8 deletions
diff --git a/test/rope_test/Jamfile.v2 b/test/rope_test/Jamfile.v2
index bcfefa0..9c65363 100644
--- a/test/rope_test/Jamfile.v2
+++ b/test/rope_test/Jamfile.v2
@@ -9,6 +9,12 @@ project tests
;
exe crope.test.o
- : crope.test.cpp crope.pred.test.cpp
+ : crope.test.cpp
: <cxxstd>20 ;
+
+exe crope.pred.test.o
+ : crope.pred.test.cpp
+ : <cxxstd>20 ;
+
+
diff --git a/test/rope_test/crope.pred.test.cpp b/test/rope_test/crope.pred.test.cpp
index 72d0e2f..2d0ddae 100644
--- a/test/rope_test/crope.pred.test.cpp
+++ b/test/rope_test/crope.pred.test.cpp
@@ -10,19 +10,24 @@
#define BOOST_TEST_MODULE crope_pred
#include <boost/test/included/unit_test.hpp>
-BOOST_AUTO_TEST_CASE(rope_should_succeed_in_empty_pred)
+BOOST_AUTO_TEST_CASE(rope_should_succeed_in_find_pred)
{
- auto rope = ocl::tproc::crope("");
+ auto rope = ocl::tproc::crope("foo");
auto it = ocl::tproc::rope::exact_pred<ocl::tproc::crope>{"foo"}(rope.cbegin(), rope.cend());
- BOOST_TEST( it == rope.cend() );
+ BOOST_TEST(it != rope.cend());
+
+ ocl::io::println(it->data());
}
-BOOST_AUTO_TEST_CASE(rope_should_not_succeed_in_empty_pred)
+BOOST_AUTO_TEST_CASE(rope_should_succeed_in_starts_with)
{
auto rope = ocl::tproc::crope("foobar");
- // find the leaf with the exact value 'foo'
+
+ // find the leaf with the starting value 'foo'
auto it = ocl::tproc::rope::starts_with_pred<ocl::tproc::crope>{"foo"}(rope.cbegin(), rope.cend());
- BOOST_TEST( it != rope.cend() );
+ BOOST_TEST(it != rope.cend());
+
+ ocl::io::println(it->data());
}
diff --git a/test/rope_test/crope.test.cpp b/test/rope_test/crope.test.cpp
index 4565900..4fe1a87 100644
--- a/test/rope_test/crope.test.cpp
+++ b/test/rope_test/crope.test.cpp
@@ -19,6 +19,5 @@ BOOST_AUTO_TEST_CASE(allocator_should_succeed_in_empty)
BOOST_AUTO_TEST_CASE(allocator_should_not_succeed_in_empty)
{
auto rope = ocl::tproc::crope("foobar");
- // rope += ".txt";
BOOST_TEST(rope.empty() == false);
}