diff options
Diffstat (limited to 'test/rope_test/crope.pred.test.cpp')
| -rw-r--r-- | test/rope_test/crope.pred.test.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
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()); } |
