SimGrid  3.18
Versatile Simulation of Distributed Systems
cunit.cpp File Reference
#include "src/internal_config.h"
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <xbt/cunit.h>
#include <xbt/ex.hpp>
#include <xbt/string.hpp>

Classes

class  s_xbt_test_log
 
class  s_xbt_test_test
 
class  s_xbt_test_unit
 
class  s_xbt_test_suite
 

Functions

xbt_test_suite_t xbt_test_suite_by_name (const char *name, const char *fmt,...)
 retrieve a testsuite from name, or create a new one More...
 
void xbt_test_suite_push (xbt_test_suite_t suite, const char *name, ts_test_cb_t func, const char *fmt,...)
 
static void apply_selection (char *selection)
 
void xbt_test_dump (char *selection)
 
int xbt_test_run (char *selection, int verbosity)
 
void xbt_test_exit ()
 
void _xbt_test_add (const char *file, int line, const char *fmt,...)
 
void _xbt_test_fail (const char *file, int line, const char *fmt,...)
 
void xbt_test_exception (xbt_ex_t e)
 Declare that the lastly started test failed because of the provided exception. More...
 
void xbt_test_expect_failure ()
 Declare that the lastly started test was expected to fail (and actually failed) More...
 
void xbt_test_skip ()
 Declare that the lastly started test should be skipped today. More...
 
void _xbt_test_log (const char *file, int line, const char *fmt,...)
 

Variables

static std::ostream & _xbt_test_out = std::cerr
 
static std::vector< xbt_test_suite_t_xbt_test_suites
 
static int _xbt_test_nb_tests = 0
 
static int _xbt_test_test_failed = 0
 
static int _xbt_test_test_ignore = 0
 
static int _xbt_test_test_expect = 0
 
static int _xbt_test_nb_units = 0
 
static int _xbt_test_unit_failed = 0
 
static int _xbt_test_unit_ignore = 0
 
static int _xbt_test_unit_disabled = 0
 
static int _xbt_test_nb_suites = 0
 
static int _xbt_test_suite_failed = 0
 
static int _xbt_test_suite_ignore = 0
 
static int _xbt_test_suite_disabled = 0
 
xbt_test_unit_t _xbt_test_current_unit = nullptr
 

Function Documentation

◆ xbt_test_suite_by_name()

xbt_test_suite_t xbt_test_suite_by_name ( const char *  name,
const char *  fmt,
  ... 
)

retrieve a testsuite from name, or create a new one

◆ xbt_test_suite_push()

void xbt_test_suite_push ( xbt_test_suite_t  suite,
const char *  name,
ts_test_cb_t  func,
const char *  fmt,
  ... 
)

◆ apply_selection()

static void apply_selection ( char *  selection)
static

◆ xbt_test_dump()

void xbt_test_dump ( char *  selection)

◆ xbt_test_run()

int xbt_test_run ( char *  selection,
int  verbosity 
)

◆ xbt_test_exit()

void xbt_test_exit ( )

◆ _xbt_test_add()

void _xbt_test_add ( const char *  file,
int  line,
const char *  fmt,
  ... 
)

◆ _xbt_test_fail()

void _xbt_test_fail ( const char *  file,
int  line,
const char *  fmt,
  ... 
)

◆ _xbt_test_log()

void _xbt_test_log ( const char *  file,
int  line,
const char *  fmt,
  ... 
)

Variable Documentation

◆ _xbt_test_out

std::ostream& _xbt_test_out = std::cerr
static

◆ _xbt_test_suites

std::vector<xbt_test_suite_t> _xbt_test_suites
static

◆ _xbt_test_nb_tests

int _xbt_test_nb_tests = 0
static

◆ _xbt_test_test_failed

int _xbt_test_test_failed = 0
static

◆ _xbt_test_test_ignore

int _xbt_test_test_ignore = 0
static

◆ _xbt_test_test_expect

int _xbt_test_test_expect = 0
static

◆ _xbt_test_nb_units

int _xbt_test_nb_units = 0
static

◆ _xbt_test_unit_failed

int _xbt_test_unit_failed = 0
static

◆ _xbt_test_unit_ignore

int _xbt_test_unit_ignore = 0
static

◆ _xbt_test_unit_disabled

int _xbt_test_unit_disabled = 0
static

◆ _xbt_test_nb_suites

int _xbt_test_nb_suites = 0
static

◆ _xbt_test_suite_failed

int _xbt_test_suite_failed = 0
static

◆ _xbt_test_suite_ignore

int _xbt_test_suite_ignore = 0
static

◆ _xbt_test_suite_disabled

int _xbt_test_suite_disabled = 0
static

◆ _xbt_test_current_unit

xbt_test_unit_t _xbt_test_current_unit = nullptr