RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables

This source file contains the core implementation of RTEMS Test Framework. More...

#include <rtems/test.h>
#include <sys/queue.h>
#include <limits.h>
#include <pthread.h>
#include <sched.h>
#include <setjmp.h>
#include <stdatomic.h>
#include "t-test-printf.h"

Data Structures

struct  T_context
 
struct  T_putchar_string_context
 

Macros

#define _GNU_SOURCE
 
#define T_LINE_SIZE   256
 
#define T_BIGGEST_ALIGNMENT   sizeof(long long)
 

Functions

bool T_is_runner (void)
 
int T_snprintf (char *s, size_t n, char const *fmt,...)
 
int T_vprintf (char const *fmt, va_list ap)
 
int T_puts (const char *buf, size_t len)
 
size_t T_str_copy (char *dst, const char *src, size_t n)
 
void T_make_runner (void)
 
int T_printf (char const *fmt,...)
 
void T_log (T_verbosity verbosity, char const *fmt,...)
 
T_NO_RETURN void T_stop (void)
 
void T_plan (unsigned int planned_steps)
 
void T_push_plan (T_fixture_node *node, unsigned int planned_steps)
 
void T_pop_plan (void)
 
void T_check_step (const T_check_context *t, unsigned int expected)
 
void T_case_register (T_case_context *tc)
 
T_verbosity T_set_verbosity (T_verbosity verbosity)
 
void * T_fixture_context (void)
 
void T_set_fixture_context (void *context)
 
const char * T_case_name (void)
 
void T_check (const T_check_context *t, bool ok,...)
 
void T_add_destructor (T_destructor *dtor, void(*destroy)(T_destructor *))
 
void T_remove_destructor (T_destructor *dtor)
 
int T_main (const T_config *config)
 
void T_register (void)
 
void T_run_initialize (const T_config *config)
 
void T_run_all (void)
 
void T_run_by_name (const char *name)
 
void * T_case_begin (const char *name, const T_fixture *fixture)
 
void T_case_end (void)
 
bool T_run_finalize (void)
 
T_time T_case_begin_time (void)
 
void T_set_putchar (T_putchar new_putchar, void *new_arg, T_putchar *old_putchar, void **old_arg)
 
T_time T_now (void)
 
void * T_push_fixture (T_fixture_node *node, const T_fixture *fixture)
 
void T_pop_fixture (void)
 
void T_add_remark (T_remark *remark)
 
size_t T_get_scope (const char *const *const *desc, char *buf, size_t n, const size_t *second_indices)
 Gets the scope for nested fixtures.
 
struct __attribute__ ((__aligned__(T_BIGGEST_ALIGNMENT)))
 
void * T_malloc (size_t size)
 
void * T_calloc (size_t nelem, size_t elsize)
 
void * T_zalloc (size_t size, void(*destroy)(void *))
 
void T_free (void *ptr)
 

Variables

const T_check_context T_special
 
const T_fixture T_empty_fixture
 
 T_malloc_destructor
 

Detailed Description

This source file contains the core implementation of RTEMS Test Framework.

Function Documentation

◆ T_get_scope()

size_t T_get_scope ( const char *const *const *  desc,
char *  buf,
size_t  n,
const size_t *  second_indices 
)

Gets the scope for nested fixtures.

This function should help implementing scope fixture methods. The parameter layout allows efficient code generation for this method.

Parameters
descis the description table. It shall be a NULL-terminated array which references arrays of descriptive strings.
bufis the buffer for the scope string.
nis the size of the scope buffer in characters.
second_indicesis an array of indices defining which descriptive string is used for each entry in the description table.
Returns
Returns the characters consumed from the buffer for the produced scope.