summaryrefslogtreecommitdiffhomepage
path: root/test/option.test.cpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-27 12:29:45 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-27 12:29:45 +0100
commitc81154c470cec39f092c6ff094cd45d3f27410f3 (patch)
treeab540cae3f84d7f8775f70e252bc96a766ef4768 /test/option.test.cpp
parentf69ab8b1fcc0e1cca1c1dff96e204440f1f4f7f3 (diff)
test: Use correct macros for option unit tests.
test: allocator_op is now doing the full range check. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'test/option.test.cpp')
-rw-r--r--test/option.test.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/test/option.test.cpp b/test/option.test.cpp
index 6751356..0e654b1 100644
--- a/test/option.test.cpp
+++ b/test/option.test.cpp
@@ -13,30 +13,12 @@
BOOST_AUTO_TEST_CASE(option_should_fail)
{
- bool ret = false;
- try
- {
- ocl::option opt(ocl::eval_false());
- opt.expect("");
- }
- catch (...)
- {
- ret = true;
- }
- BOOST_TEST(ret == true);
+ ocl::option opt(ocl::eval_false());
+ BOOST_CHECK_THROW(opt.expect(""), std::exception);
}
BOOST_AUTO_TEST_CASE(option_should_succeed)
{
- bool ret = true;
- try
- {
- ocl::option opt(ocl::eval_true());
- opt.expect("");
- }
- catch (...)
- {
- ret = false;
- }
- BOOST_TEST(ret == true);
+ ocl::option opt(ocl::eval_true());
+ BOOST_CHECK_NO_THROW(opt.expect(""));
}