13 typedef copp::stack_pool<copp::allocator::stack_allocator_malloc>
stack_pool_t;
16 using coroutine_type = copp::coroutine_context_container<stack_allocator_type>;
26 copp::stack_context ctx;
30 unsigned char test_buffer[256];
31 ctx.sp =
reinterpret_cast<void *
>(test_buffer + 256);
32 ctx.size =
sizeof(test_buffer);
41 std::vector<stack_pool_test_task_t::ptr_t> task_arr;
42 const size_t task_arr_sz = 64;
45 for (
size_t i = 0; i < task_arr_sz; ++i) {
48 task_arr.push_back(tp);
58 for (
size_t i = 0; i < task_arr_sz / 2; ++i) {
82 std::vector<stack_pool_test_task_t::ptr_t> task_arr;
83 const size_t task_arr_sz = 64;
86 for (
size_t i = 0; i < task_arr_sz; ++i) {
90 task_arr.push_back(tp);
104 std::vector<stack_pool_test_task_t::ptr_t> task_arr;
105 const size_t task_arr_sz = 64;
110 for (
size_t i = 0; i < task_arr_sz; ++i) {
113 task_arr.push_back(tp);
123 for (
size_t i = 0; i < task_arr_sz; ++i) {
141 std::vector<stack_pool_test_task_t::ptr_t> task_arr;
142 const size_t task_arr_sz = 64;
148 for (
size_t i = 0; i < task_arr_sz; ++i) {
151 task_arr.push_back(tp);
161 for (
size_t i = 0; i < task_arr_sz; ++i) {
186 std::vector<stack_pool_test_task_t::ptr_t> task_arr;
187 stack_pool_test_task_t::ptr_t tp1;
188 stack_pool_test_task_t::ptr_t tp2;
static stack_pool_t::ptr_t global_stack_pool
copp::stack_pool< copp::allocator::stack_allocator_malloc > stack_pool_t
cotask::task< stack_pool_test_macro_coroutine > stack_pool_test_task_t
static int stack_pool_test_task_action(void *)
CASE_TEST(stack_pool_test, stack_context)
copp::coroutine_context_container< stack_allocator_type > coroutine_type
copp::allocator::stack_allocator_pool< stack_pool_t > stack_allocator_type
#define CASE_EXPECT_EQ(l, r)
#define CASE_EXPECT_TRUE(c)