libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
thread_wrapper.cpp File Reference
#include "stdafx.h"
#include <boost/test/included/unit_test.hpp>
#include <boost/mpl/list.hpp>
#include "core/thread_wrapper.hpp"
#include <typeinfo>
Include dependency graph for thread_wrapper.cpp:

Go to the source code of this file.

Classes

struct  thread_wrapper< exit_val, Mdl >
 

Macros

#define BOOST_TEST_MODULE   libjmmcg_tests
 

Typedefs

typedef boost::mpl::list< ppd::heavyweight_threading > thread_types
 

Functions

 BOOST_AUTO_TEST_CASE_TEMPLATE (default_ctor, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (start_thread, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (create_suspended, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (create_suspended_thread_then_resume, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (create_running_thread_then_suspend, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (create_running_thread_then_suspend_then_resume, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (default_ctor_two_threads, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (start_two_threads, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (start_two_suspended_threads, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (start_two_suspended_threads_then_resume_them, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (create_two_running_threads_then_suspend_them, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (create_two_running_threads_then_suspend_and_resume_them, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (default_ctor_functor, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (default_ctor_stdbind, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (default_ctor_stdfn, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE_TEMPLATE (default_ctor_lambda, Mdl, thread_types)
 
 BOOST_AUTO_TEST_CASE (default_ctor)
 
 BOOST_AUTO_TEST_CASE (start_thread)
 
 BOOST_AUTO_TEST_CASE (create_suspended)
 
 BOOST_AUTO_TEST_CASE (create_suspended_thread_then_resume)
 
 BOOST_AUTO_TEST_CASE (create_running_thread_then_suspend)
 
 BOOST_AUTO_TEST_CASE (create_running_thread_then_suspend_then_resume)
 
 BOOST_AUTO_TEST_CASE (default_ctor_two_threads)
 
 BOOST_AUTO_TEST_CASE (start_two_threads)
 
 BOOST_AUTO_TEST_CASE (start_two_suspended_threads)
 
 BOOST_AUTO_TEST_CASE (start_two_suspended_threads_then_resume_them)
 
 BOOST_AUTO_TEST_CASE (create_two_running_threads_then_suspend_them)
 
 BOOST_AUTO_TEST_CASE (create_two_running_threads_then_suspend_and_resume_them)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   libjmmcg_tests

Definition at line 21 of file thread_wrapper.cpp.

Typedef Documentation

◆ thread_types

typedef boost::mpl::list< ppd::heavyweight_threading> thread_types

Definition at line 35 of file thread_wrapper.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/12]

BOOST_AUTO_TEST_CASE ( create_running_thread_then_suspend  )

Definition at line 346 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/12]

BOOST_AUTO_TEST_CASE ( create_running_thread_then_suspend_then_resume  )

Definition at line 356 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [3/12]

BOOST_AUTO_TEST_CASE ( create_suspended  )

Definition at line 326 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [4/12]

BOOST_AUTO_TEST_CASE ( create_suspended_thread_then_resume  )

Definition at line 335 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [5/12]

BOOST_AUTO_TEST_CASE ( create_two_running_threads_then_suspend_and_resume_them  )

Definition at line 436 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [6/12]

BOOST_AUTO_TEST_CASE ( create_two_running_threads_then_suspend_them  )

Definition at line 420 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [7/12]

BOOST_AUTO_TEST_CASE ( default_ctor  )

Test that we can default construct & delete a stack_string object.

Definition at line 309 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [8/12]

BOOST_AUTO_TEST_CASE ( default_ctor_two_threads  )

Definition at line 369 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [9/12]

BOOST_AUTO_TEST_CASE ( start_thread  )

Definition at line 316 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [10/12]

BOOST_AUTO_TEST_CASE ( start_two_suspended_threads  )

Definition at line 392 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [11/12]

BOOST_AUTO_TEST_CASE ( start_two_suspended_threads_then_resume_them  )

Definition at line 404 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE() [12/12]

BOOST_AUTO_TEST_CASE ( start_two_threads  )

Definition at line 378 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [1/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( create_running_thread_then_suspend  ,
Mdl  ,
thread_types   
)

Definition at line 101 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [2/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( create_running_thread_then_suspend_then_resume  ,
Mdl  ,
thread_types   
)

Definition at line 112 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [3/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( create_suspended  ,
Mdl  ,
thread_types   
)

Definition at line 81 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [4/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( create_suspended_thread_then_resume  ,
Mdl  ,
thread_types   
)

Definition at line 90 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [5/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( create_two_running_threads_then_suspend_and_resume_them  ,
Mdl  ,
thread_types   
)

Definition at line 192 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [6/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( create_two_running_threads_then_suspend_them  ,
Mdl  ,
thread_types   
)

Definition at line 176 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [7/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( default_ctor  ,
Mdl  ,
thread_types   
)
Test:
Tests for the thread-as-a-class model.
Test:
Tests for the thread-as-a-class model.

Definition at line 64 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [8/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( default_ctor_functor  ,
Mdl  ,
thread_types   
)

Definition at line 213 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [9/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( default_ctor_lambda  ,
Mdl  ,
thread_types   
)

Definition at line 270 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [10/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( default_ctor_stdbind  ,
Mdl  ,
thread_types   
)

Definition at line 235 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [11/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( default_ctor_stdfn  ,
Mdl  ,
thread_types   
)

Definition at line 252 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [12/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( default_ctor_two_threads  ,
Mdl  ,
thread_types   
)

Definition at line 125 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [13/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( start_thread  ,
Mdl  ,
thread_types   
)

Definition at line 71 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [14/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( start_two_suspended_threads  ,
Mdl  ,
thread_types   
)

Definition at line 148 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [15/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( start_two_suspended_threads_then_resume_them  ,
Mdl  ,
thread_types   
)

Definition at line 160 of file thread_wrapper.cpp.

◆ BOOST_AUTO_TEST_CASE_TEMPLATE() [16/16]

BOOST_AUTO_TEST_CASE_TEMPLATE ( start_two_threads  ,
Mdl  ,
thread_types   
)

Definition at line 134 of file thread_wrapper.cpp.