theCore C++ embedded framework
thread_unit.cpp File Reference
#include <ecl/thread/thread.hpp>
#include <CppUTest/TestHarness.h>
#include <CppUTest/CommandLineTestRunner.h>
#include <cstring>
#include <thread>
Include dependency graph for thread_unit.cpp:

Data Structures

struct  test_arg
 

Functions

static ecl::err dummy_routine (void *arg)
 
 TEST_GROUP (not_started_native_thread)
 
 TEST (not_started_native_thread, get_name_test)
 
 TEST (not_started_native_thread, set_name_test)
 
 TEST (not_started_native_thread, set_stack_size)
 
 TEST (not_started_native_thread, set_routine)
 
 TEST (not_started_native_thread, join)
 
 TEST (not_started_native_thread, detach)
 
static ecl::err test_routine (void *arg)
 
 TEST_GROUP (started_native_thread)
 
 TEST (started_native_thread, basic)
 
 TEST (started_native_thread, get_name_test)
 
 TEST (started_native_thread, set_name_test)
 
 TEST (started_native_thread, join_with_parameter)
 
 TEST_GROUP (detached_native_thread)
 
 TEST (detached_native_thread, basic)
 
int main (int argc, char *argv[])
 

Variables

static int dummy_ctx = 0
 
static char name [16] = {0}
 
static ssize_t name_size
 
static test_arg routine_arg
 
static ecl::native_thread started_tr
 
static bool started_tr_joined_or_detached
 
static ecl::native_thread detached_tr
 

Function Documentation

◆ dummy_routine()

static ecl::err dummy_routine ( void *  arg)
static

◆ TEST_GROUP() [1/3]

TEST_GROUP ( not_started_native_thread  )
Here is the call graph for this function:

◆ TEST() [1/11]

TEST ( not_started_native_thread  ,
get_name_test   
)
Here is the call graph for this function:

◆ TEST() [2/11]

TEST ( not_started_native_thread  ,
set_name_test   
)
Here is the call graph for this function:

◆ TEST() [3/11]

TEST ( not_started_native_thread  ,
set_stack_size   
)
Here is the call graph for this function:

◆ TEST() [4/11]

TEST ( not_started_native_thread  ,
set_routine   
)
Here is the call graph for this function:

◆ TEST() [5/11]

TEST ( not_started_native_thread  ,
join   
)
Here is the call graph for this function:

◆ TEST() [6/11]

TEST ( not_started_native_thread  ,
detach   
)
Here is the call graph for this function:

◆ test_routine()

static ecl::err test_routine ( void *  arg)
static
Here is the call graph for this function:

◆ TEST_GROUP() [2/3]

TEST_GROUP ( started_native_thread  )
Here is the call graph for this function:

◆ TEST() [7/11]

TEST ( started_native_thread  ,
basic   
)

◆ TEST() [8/11]

TEST ( started_native_thread  ,
get_name_test   
)
Here is the call graph for this function:

◆ TEST() [9/11]

TEST ( started_native_thread  ,
set_name_test   
)
Here is the call graph for this function:

◆ TEST() [10/11]

TEST ( started_native_thread  ,
join_with_parameter   
)
Here is the call graph for this function:

◆ TEST_GROUP() [3/3]

TEST_GROUP ( detached_native_thread  )
Here is the call graph for this function:

◆ TEST() [11/11]

TEST ( detached_native_thread  ,
basic   
)
Here is the call graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Variable Documentation

◆ dummy_ctx

int dummy_ctx = 0
static

◆ name

char name[16] = {0}
static

◆ name_size

ssize_t name_size
static

◆ routine_arg

test_arg routine_arg
static

◆ started_tr

ecl::native_thread started_tr
static

◆ started_tr_joined_or_detached

bool started_tr_joined_or_detached
static

◆ detached_tr

ecl::native_thread detached_tr
static