本文整理汇总了C++中BOOST_TEST_CASE函数的典型用法代码示例。如果您正苦于以下问题:C++ BOOST_TEST_CASE函数的具体用法?C++ BOOST_TEST_CASE怎么用?C++ BOOST_TEST_CASE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BOOST_TEST_CASE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init_unit_test_suite
boost::unit_test_framework::test_suite* init_unit_test_suite(int, char*[])
{
boost::unit_test_framework::test_suite* test =
BOOST_TEST_SUITE("Boost.Fiber: futures test suite");
test->add(BOOST_TEST_CASE(test_promise_create));
test->add(BOOST_TEST_CASE(test_promise_create_ref));
test->add(BOOST_TEST_CASE(test_promise_create_void));
test->add(BOOST_TEST_CASE(test_promise_move));
test->add(BOOST_TEST_CASE(test_promise_move_ref));
test->add(BOOST_TEST_CASE(test_promise_move_void));
test->add(BOOST_TEST_CASE(test_promise_swap));
test->add(BOOST_TEST_CASE(test_promise_swap_ref));
test->add(BOOST_TEST_CASE(test_promise_swap_void));
test->add(BOOST_TEST_CASE(test_promise_get_future));
test->add(BOOST_TEST_CASE(test_promise_get_future_ref));
test->add(BOOST_TEST_CASE(test_promise_get_future_void));
test->add(BOOST_TEST_CASE(test_promise_set_value));
test->add(BOOST_TEST_CASE(test_promise_set_value_ref));
test->add(BOOST_TEST_CASE(test_promise_set_value_void));
test->add(BOOST_TEST_CASE(test_promise_set_exception));
test->add(BOOST_TEST_CASE(test_promise_set_exception_ref));
test->add(BOOST_TEST_CASE(test_promise_set_exception_void));
test->add(BOOST_TEST_CASE(test_future_create));
test->add(BOOST_TEST_CASE(test_future_create_ref));
test->add(BOOST_TEST_CASE(test_future_create_void));
test->add(BOOST_TEST_CASE(test_future_move));
test->add(BOOST_TEST_CASE(test_future_move_ref));
test->add(BOOST_TEST_CASE(test_future_move_void));
test->add(BOOST_TEST_CASE(test_future_swap));
test->add(BOOST_TEST_CASE(test_future_swap_ref));
test->add(BOOST_TEST_CASE(test_future_swap_void));
test->add(BOOST_TEST_CASE(test_future_get));
test->add(BOOST_TEST_CASE(test_future_get_ref));
test->add(BOOST_TEST_CASE(test_future_get_ref));
test->add(BOOST_TEST_CASE(test_future_get_void));
test->add(BOOST_TEST_CASE(test_future_share));
test->add(BOOST_TEST_CASE(test_future_share_ref));
test->add(BOOST_TEST_CASE(test_future_share_void));
test->add(BOOST_TEST_CASE(test_future_wait));
test->add(BOOST_TEST_CASE(test_future_wait_ref));
test->add(BOOST_TEST_CASE(test_future_wait_void));
test->add(BOOST_TEST_CASE(test_future_wait_with_fiber_1));
test->add(BOOST_TEST_CASE(test_future_wait_with_fiber_2));
// test->add(BOOST_TEST_CASE(test_shared_future_move));
// test->add(BOOST_TEST_CASE(test_shared_future_move_ref));
// test->add(BOOST_TEST_CASE(test_shared_future_move_void));
test->add(BOOST_TEST_CASE(test_packaged_task_create));
test->add(BOOST_TEST_CASE(test_packaged_task_create_void));
test->add(BOOST_TEST_CASE(test_packaged_task_move));
test->add(BOOST_TEST_CASE(test_packaged_task_move_void));
test->add(BOOST_TEST_CASE(test_packaged_task_swap));
test->add(BOOST_TEST_CASE(test_packaged_task_swap_void));
test->add(BOOST_TEST_CASE(test_packaged_task_reset));
test->add(BOOST_TEST_CASE(test_packaged_task_reset_void));
test->add(BOOST_TEST_CASE(test_packaged_task_get_future));
test->add(BOOST_TEST_CASE(test_packaged_task_get_future_void));
test->add(BOOST_TEST_CASE(test_packaged_task_exec));
test->add(BOOST_TEST_CASE(test_packaged_task_exec_ref));
test->add(BOOST_TEST_CASE(test_packaged_task_exec_void));
test->add(BOOST_TEST_CASE(test_packaged_task_exception));
test->add(BOOST_TEST_CASE(test_packaged_task_exception_void));
test->add(BOOST_TEST_CASE(test_async_1));
test->add(BOOST_TEST_CASE(test_async_2));
return test;
}
示例2: init_unit_test_suite
test_suite* init_unit_test_suite(int, char*[])
{
test_suite* test = BOOST_TEST_SUITE("basic_streambuf");
test->add(BOOST_TEST_CASE(&null_test));
return test;
}
示例3: init_unit_test_suite
//------------------------------------------------------------------------------
test_suite* init_unit_test_suite(int, char*[])
{
test_suite* test = BOOST_TEST_SUITE("windows/random_access_handle");
test->add(BOOST_TEST_CASE(&windows_random_access_handle_compile::test));
return test;
}
示例4: init_unit_test_suite
test_suite* init_unit_test_suite(int, char*[])
{
test_suite* test = BOOST_TEST_SUITE("ip/resolver_service");
test->add(BOOST_TEST_CASE(&null_test));
return test;
}
示例5: init_unit_test_suite
boost::unit_test::test_suite * init_unit_test_suite( int, char* []) {
boost::unit_test::test_suite * test =
BOOST_TEST_SUITE("Boost.Fiber: fiber test suite");
test->add( BOOST_TEST_CASE( & test_scheduler_dtor) );
test->add( BOOST_TEST_CASE( & test_join_fn) );
test->add( BOOST_TEST_CASE( & test_join_memfn) );
test->add( BOOST_TEST_CASE( & test_join_copyable) );
test->add( BOOST_TEST_CASE( & test_join_moveable) );
test->add( BOOST_TEST_CASE( & test_join_lambda) );
test->add( BOOST_TEST_CASE( & test_join_bind) );
test->add( BOOST_TEST_CASE( & test_join_in_fiber) );
test->add( BOOST_TEST_CASE( & test_move_fiber) );
test->add( BOOST_TEST_CASE( & test_yield) );
test->add( BOOST_TEST_CASE( & test_sleep_for) );
test->add( BOOST_TEST_CASE( & test_sleep_until) );
test->add( BOOST_TEST_CASE( & test_detach) );
return test;
}
示例6: init_unit_test_suite
test_suite* init_unit_test_suite(int, char*[])
{
test_suite* test = BOOST_TEST_SUITE("error");
test->add(BOOST_TEST_CASE(&error_test));
return test;
}
示例7: init_unit_test_suite
boost::unit_test::test_suite* init_unit_test_suite( int argc, char* argv[] )
{
const std::size_t number_of_names = 18;
const char* names[number_of_names]
= {
"jvb/tests/ReadStaticAttributeArrayBoolean"
, "jvb/tests/ReadStaticAttributeArrayByte"
, "jvb/tests/ReadStaticAttributeArrayChar"
, "jvb/tests/ReadStaticAttributeArrayDouble"
, "jvb/tests/ReadStaticAttributeArrayFloat"
, "jvb/tests/ReadStaticAttributeArrayInt"
, "jvb/tests/ReadStaticAttributeArrayLong"
, "jvb/tests/ReadStaticAttributeArrayObject"
, "jvb/tests/ReadStaticAttributeArrayShort"
, "jvb/tests/ReadStaticAttributeBoolean"
, "jvb/tests/ReadStaticAttributeByte"
, "jvb/tests/ReadStaticAttributeChar"
, "jvb/tests/ReadStaticAttributeDouble"
, "jvb/tests/ReadStaticAttributeFloat"
, "jvb/tests/ReadStaticAttributeInt"
, "jvb/tests/ReadStaticAttributeLong"
, "jvb/tests/ReadStaticAttributeObject"
, "jvb/tests/ReadStaticAttributeShort"
};
if(argc != number_of_names+1)
{
std::cout << "Must be passed 3 classes files compiled for tests" << std::endl;
std::abort();
}
jvb::jvm jvm;
jvb::environment e = jvm.environment();
for(std::size_t i = 0; i != number_of_names; ++i)
{
std::cout << "loading " << argv[i+1] << " with " << names[i] << std::endl;
e.load_class(argv[i+1], names[i]);
}
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_array_boolean, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_array_byte, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_array_char, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_array_double, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_array_float, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_array_int, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_array_long, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_array_object, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_array_short, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_boolean, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_byte, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_char, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_double, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_float, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_int, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_long, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_object, jvm, e) ));
boost::unit_test::framework::master_test_suite()
.add( BOOST_TEST_CASE( boost::bind(&read_static_attribute_short, jvm, e) ));
return 0;
}
示例8: init_unit_test_suite
test_suite* init_unit_test_suite(int, char*[])
{
test_suite* test = BOOST_TEST_SUITE("serial_port_base");
test->add(BOOST_TEST_CASE(&serial_port_base_compile::test));
return test;
}
示例9: init_unit_test_suite
boost::unit_test_framework::test_suite* init_unit_test_suite(int, char*[]) {
boost::unit_test_framework::test_suite* test =
BOOST_TEST_SUITE("Boost.Fiber: promise test suite");
test->add(BOOST_TEST_CASE(test_promise_create));
test->add(BOOST_TEST_CASE(test_promise_create_ref));
test->add(BOOST_TEST_CASE(test_promise_create_void));
test->add(BOOST_TEST_CASE(test_promise_move));
test->add(BOOST_TEST_CASE(test_promise_move_ref));
test->add(BOOST_TEST_CASE(test_promise_move_void));
test->add(BOOST_TEST_CASE(test_promise_swap));
test->add(BOOST_TEST_CASE(test_promise_swap_ref));
test->add(BOOST_TEST_CASE(test_promise_swap_void));
test->add(BOOST_TEST_CASE(test_promise_get_future));
test->add(BOOST_TEST_CASE(test_promise_get_future_ref));
test->add(BOOST_TEST_CASE(test_promise_get_future_void));
test->add(BOOST_TEST_CASE(test_promise_set_value));
test->add(BOOST_TEST_CASE(test_promise_set_value_move));
test->add(BOOST_TEST_CASE(test_promise_set_value_ref));
test->add(BOOST_TEST_CASE(test_promise_set_value_void));
test->add(BOOST_TEST_CASE(test_promise_set_exception));
test->add(BOOST_TEST_CASE(test_promise_set_exception_ref));
test->add(BOOST_TEST_CASE(test_promise_set_exception_void));
return test;
}
示例10: init_unit_test_suite
test_suite* init_unit_test_suite(int, char*[])
{
test_suite* test = BOOST_TEST_SUITE("local/datagram_protocol");
test->add(BOOST_TEST_CASE(&local_datagram_protocol_socket_compile::test));
return test;
}
示例11: init_unit_test_suite
boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
{
boost::unit_test_framework::test_suite * test =
BOOST_TEST_SUITE("Boost.Fiber: lock test suite");
test->add( BOOST_TEST_CASE( & test_lock) );
test->add( BOOST_TEST_CASE( & test_defer_lock) );
test->add( BOOST_TEST_CASE( & test_adopt_lock) );
test->add( BOOST_TEST_CASE( & test_try_lock) );
test->add( BOOST_TEST_CASE( & test_lock_twice) );
test->add( BOOST_TEST_CASE( & test_try_lock_twice) );
test->add( BOOST_TEST_CASE( & test_unlock_twice) );
test->add( BOOST_TEST_CASE( & test_default_ctor) );
test->add( BOOST_TEST_CASE( & test_lock_concept) );
test->add( BOOST_TEST_CASE( & test_try_lock_concept) );
test->add( BOOST_TEST_CASE( & test_swap) );
return test;
}
示例12: init_unit_test_suite
pdalboost::unit_test::test_suite* init_unit_test_suite(int, char* [])
{
pdalboost::unit_test::test_suite* test = BOOST_TEST_SUITE("mapped_file test");
test->add(BOOST_TEST_CASE(&path_test));
return test;
}
示例13: init_unit_test_suite
test_suite* init_unit_test_suite(int, char*[])
{
test_suite* test = BOOST_TEST_SUITE("signal_set");
test->add(BOOST_TEST_CASE(&signal_set_compile::test));
return test;
}
示例14: init_unit_test_suite
test_suite* init_unit_test_suite(int, char*[])
{
test_suite* test = BOOST_TEST_SUITE("local/connect_pair");
test->add(BOOST_TEST_CASE(&local_connect_pair_compile::test));
return test;
}
示例15: init_unit_test_suite
///////////////////////////////////////////////////////////////////////////////
// init_unit_test_suite
//
test_suite* init_unit_test_suite( int argc, char* argv[] )
{
test_suite *test = BOOST_TEST_SUITE("test6u");
test->add(BOOST_TEST_CASE(&test_main));
return test;
}