xapian-core  1.4.26
Classes | Macros | Functions | Variables
testsuite.cc File Reference

a test suite engine More...

#include <config.h>
#include "testsuite.h"
#include "backendmanager.h"
#include "fdtracker.h"
#include "testrunner.h"
#include "safeunistd.h"
#include <algorithm>
#include <ios>
#include <iostream>
#include <set>
#include <cerrno>
#include <cfloat>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "gnu_getopt.h"
#include <setjmp.h>
#include <signal.h>
#include <exception>
#include <xapian/error.h>
#include "errno_to_string.h"
#include "filetests.h"
#include "noreturn.h"
#include "str.h"
#include "stringutils.h"
+ Include dependency graph for testsuite.cc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SignalRedirector
 

Macros

#define SIGSETJMP(ENV, SAVESIGS)   setjmp(ENV)
 
#define SIGLONGJMP(ENV, VAL)   longjmp(ENV, VAL)
 
#define SIGJMP_BUF   jmp_buf
 

Functions

static void handle_sig (int signum_)
 
static void report_totals (void)
 
bool TEST_EQUAL_DOUBLE_ (double a, double b)
 Helper function for TEST_EQUAL_DOUBLE macro. More...
 

Variables

int verbose
 The global verbose flag. More...
 
const char * expected_exception = NULL
 The exception type we were expecting in TEST_EXCEPTION. More...
 
const char * expected_failure
 Set to a string explanation for testcases expected to fail. More...
 
std::ostringstream tout
 The debug printing stream. More...
 
static SIGJMP_BUF jb
 
static int signum = 0
 
static void * sigaddr = NULL
 

Detailed Description

a test suite engine

Definition in file testsuite.cc.

Macro Definition Documentation

◆ SIGJMP_BUF

#define SIGJMP_BUF   jmp_buf

Definition at line 92 of file testsuite.cc.

◆ SIGLONGJMP

#define SIGLONGJMP (   ENV,
  VAL 
)    longjmp(ENV, VAL)

Definition at line 91 of file testsuite.cc.

Referenced by handle_sig().

◆ SIGSETJMP

#define SIGSETJMP (   ENV,
  SAVESIGS 
)    setjmp(ENV)

Definition at line 90 of file testsuite.cc.

Referenced by test_driver::runtest().

Function Documentation

◆ handle_sig()

static void handle_sig ( int  signum_)
static

Definition at line 215 of file testsuite.cc.

References jb, SIGLONGJMP, and signum.

Referenced by SignalRedirector::activate().

◆ report_totals()

static void report_totals ( void  )
static

Definition at line 776 of file testsuite.cc.

References test_driver::report().

Referenced by test_driver::report().

◆ TEST_EQUAL_DOUBLE_()

bool TEST_EQUAL_DOUBLE_ ( double  a,
double  b 
)

Helper function for TEST_EQUAL_DOUBLE macro.

Definition at line 928 of file testsuite.cc.

Referenced by mset_range_is_same(), and mset_range_is_same_weights().

Variable Documentation

◆ expected_exception

const char* expected_exception = NULL

The exception type we were expecting in TEST_EXCEPTION.

Definition at line 99 of file testsuite.cc.

Referenced by test_driver::runtest().

◆ expected_failure

const char* expected_failure

Set to a string explanation for testcases expected to fail.

Definition at line 101 of file testsuite.cc.

Referenced by test_driver::runtest(), and XFAIL().

◆ jb

SIGJMP_BUF jb
static

Definition at line 176 of file testsuite.cc.

Referenced by handle_sig(), and test_driver::runtest().

◆ sigaddr

void* sigaddr = NULL
static

Definition at line 178 of file testsuite.cc.

Referenced by SignalRedirector::activate(), and test_driver::runtest().

◆ signum

int signum = 0
static

Definition at line 177 of file testsuite.cc.

Referenced by SignalRedirector::activate(), handle_sig(), and test_driver::runtest().

◆ tout

std::ostringstream tout

◆ verbose

int verbose

The global verbose flag.

Definition at line 79 of file testsuite.cc.

Referenced by test_driver::do_run_tests(), test_driver::parse_command_line(), and test_driver::runtest().