Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TestSupport.hxx File Reference
#include "TError.h"
#include "TInterpreter.h"
#include <iostream>
#include <stdexcept>
#include <vector>
Include dependency graph for TestSupport.hxx:
This graph shows which files directly or indirectly include this file:

Classes

class  ROOT::TestSupport::CheckDiagsRAII
 Install a ROOT diagnostic handler to analyse diagnostics. More...
 
struct  ROOT::TestSupport::CheckDiagsRAII::Diag_t
 
class  ROOT::TestSupport::FilterDiagsRAII
 Allows a user function to catch and filter/analyse ROOT and cling diagnostics, e.g. More...
 

Namespaces

namespace  ROOT
 Namespace for new ROOT classes and functions.
 
namespace  ROOT::TestSupport
 

Macros

#define ROOT_EXPECT_DIAG(diag_class, expression, where, expected_diag, match_full)
 
#define ROOT_EXPECT_ERROR(expression, where, expected_diag)    ROOT_EXPECT_DIAG(kError, expression, where, expected_diag, true)
 
#define ROOT_EXPECT_ERROR_PARTIAL(expression, where, expected_diag)    ROOT_EXPECT_DIAG(kError, expression, where, expected_diag, false)
 
#define ROOT_EXPECT_INFO(expression, where, expected_diag)    ROOT_EXPECT_DIAG(kInfo, expression, where, expected_diag, true)
 
#define ROOT_EXPECT_INFO_PARTIAL(expression, where, expected_diag)    ROOT_EXPECT_DIAG(kInfo, expression, where, expected_diag, false)
 
#define ROOT_EXPECT_NODIAG(expression)
 
#define ROOT_EXPECT_SYSERROR(expression, where, expected_diag)    ROOT_EXPECT_DIAG(kSysError, expression, where, expected_diag, true)
 
#define ROOT_EXPECT_SYSERROR_PARTIAL(expression, where, expected_diag)    ROOT_EXPECT_DIAG(kSysError, expression, where, expected_diag, false)
 
#define ROOT_EXPECT_WARNING(expression, where, expected_diag)    ROOT_EXPECT_DIAG(kWarning, expression, where, expected_diag, true)
 
#define ROOT_EXPECT_WARNING_PARTIAL(expression, where, expected_diag)    ROOT_EXPECT_DIAG(kWarning, expression, where, expected_diag, false)
 

Detailed Description

The file contains facilities allowing easier writing of in-tree unit tests.

Author
Pratyush Das reikd.nosp@m.as@g.nosp@m.mail..nosp@m.com
Vassil Vassilev vvasi.nosp@m.lev@.nosp@m.cern..nosp@m.ch
Stephan Hageboeck steph.nosp@m.an.h.nosp@m.agebo.nosp@m.eck@.nosp@m.cern..nosp@m.ch
Date
April, 2020

Definition in file TestSupport.hxx.

Macro Definition Documentation

◆ ROOT_EXPECT_DIAG

#define ROOT_EXPECT_DIAG ( diag_class,
expression,
where,
expected_diag,
match_full )
Value:
{ \
using namespace ROOT::TestSupport; \
expression; \
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Install a ROOT diagnostic handler to analyse diagnostics.

Definition at line 158 of file TestSupport.hxx.

◆ ROOT_EXPECT_ERROR

#define ROOT_EXPECT_ERROR ( expression,
where,
expected_diag )    ROOT_EXPECT_DIAG(kError, expression, where, expected_diag, true)

Definition at line 172 of file TestSupport.hxx.

◆ ROOT_EXPECT_ERROR_PARTIAL

#define ROOT_EXPECT_ERROR_PARTIAL ( expression,
where,
expected_diag )    ROOT_EXPECT_DIAG(kError, expression, where, expected_diag, false)

Definition at line 175 of file TestSupport.hxx.

◆ ROOT_EXPECT_INFO

#define ROOT_EXPECT_INFO ( expression,
where,
expected_diag )    ROOT_EXPECT_DIAG(kInfo, expression, where, expected_diag, true)

Definition at line 184 of file TestSupport.hxx.

◆ ROOT_EXPECT_INFO_PARTIAL

#define ROOT_EXPECT_INFO_PARTIAL ( expression,
where,
expected_diag )    ROOT_EXPECT_DIAG(kInfo, expression, where, expected_diag, false)

Definition at line 187 of file TestSupport.hxx.

◆ ROOT_EXPECT_NODIAG

#define ROOT_EXPECT_NODIAG ( expression)
Value:
{ \
using namespace ROOT::TestSupport; \
expression; \
}

Definition at line 165 of file TestSupport.hxx.

◆ ROOT_EXPECT_SYSERROR

#define ROOT_EXPECT_SYSERROR ( expression,
where,
expected_diag )    ROOT_EXPECT_DIAG(kSysError, expression, where, expected_diag, true)

Definition at line 190 of file TestSupport.hxx.

◆ ROOT_EXPECT_SYSERROR_PARTIAL

#define ROOT_EXPECT_SYSERROR_PARTIAL ( expression,
where,
expected_diag )    ROOT_EXPECT_DIAG(kSysError, expression, where, expected_diag, false)

Definition at line 193 of file TestSupport.hxx.

◆ ROOT_EXPECT_WARNING

#define ROOT_EXPECT_WARNING ( expression,
where,
expected_diag )    ROOT_EXPECT_DIAG(kWarning, expression, where, expected_diag, true)

Definition at line 178 of file TestSupport.hxx.

◆ ROOT_EXPECT_WARNING_PARTIAL

#define ROOT_EXPECT_WARNING_PARTIAL ( expression,
where,
expected_diag )    ROOT_EXPECT_DIAG(kWarning, expression, where, expected_diag, false)

Definition at line 181 of file TestSupport.hxx.