diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-12-27 10:10:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-27 10:10:21 +0100 |
| commit | d9033363086aba59f67d805f09bad1e74d23acb5 (patch) | |
| tree | 0f3060bb24565803117f8ebd60b660fa96bc0f51 /test/rope_test/crope.pred.test.cpp | |
| parent | b608fb79a0100a178fe682ff6d0ba96c90f78bff (diff) | |
feat: updated Jamfile and unit tests.
Diffstat (limited to 'test/rope_test/crope.pred.test.cpp')
| -rw-r--r-- | test/rope_test/crope.pred.test.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/rope_test/crope.pred.test.cpp b/test/rope_test/crope.pred.test.cpp new file mode 100644 index 0000000..fe82d78 --- /dev/null +++ b/test/rope_test/crope.pred.test.cpp @@ -0,0 +1,28 @@ +/* + * File: crope.pred.test.cpp + * Purpose: Char rope test. + * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. + */ + +#include <ocl/tproc/rope.hpp> + +#define BOOST_TEST_MODULE crope_pred +#include <boost/test/included/unit_test.hpp> + +BOOST_AUTO_TEST_CASE(allocator_should_succeed_in_empty_pred) +{ + auto rope = ocl::tproc::crope(""); + auto it = ocl::tproc::find(rope.cbegin(), rope.cend(), ocl::tproc::exact_pred("foo")); + + BOOST_TEST(it == rope.cend()); +} + +BOOST_AUTO_TEST_CASE(allocator_should_not_succeed_in_empty_pred) +{ + auto rope = ocl::tproc::crope("foobar"); + + auto it = ocl::tproc::find(rope.cbegin(), rope.cend(), ocl::tproc::stars_with_pred("foo")); + + BOOST_TEST(it != rope.cend()); +} |
