Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TestSupport.hxx File Reference
#include "TError.h"
#include "TInterpreter.h"
#include <stdexcept>
#include <vector>
#include "gtest/gtest.h"
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
 tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tbb::task_arena without forward declaring tbb::interface7
 
namespace  ROOT::TestSupport
 

Macros

#define ROOT_EXPECT_ERROR(expression, where, expected_diag)
 
#define ROOT_EXPECT_INFO(expression, where, expected_diag)
 
#define ROOT_EXPECT_NODIAG(expression)
 
#define ROOT_EXPECT_SYSERROR(expression, where, expected_diag)
 
#define ROOT_EXPECT_WARNING(expression, where, expected_diag)
 

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_ERROR

#define ROOT_EXPECT_ERROR (   expression,
  where,
  expected_diag 
)
Value:
{ \
using namespace ROOT::TestSupport; \
CheckDiagsRAII EE(kError, where, \
expected_diag); \
expression; \
}
constexpr Int_t kError
Definition TError.h:46
Install a ROOT diagnostic handler to analyse diagnostics.

Definition at line 153 of file TestSupport.hxx.

◆ ROOT_EXPECT_INFO

#define ROOT_EXPECT_INFO (   expression,
  where,
  expected_diag 
)
Value:
{ \
using namespace ROOT::TestSupport; \
CheckDiagsRAII EE(kInfo, where, \
expected_diag); \
expression; \
}
constexpr Int_t kInfo
Definition TError.h:44

Definition at line 169 of file TestSupport.hxx.

◆ ROOT_EXPECT_NODIAG

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

Definition at line 177 of file TestSupport.hxx.

◆ ROOT_EXPECT_SYSERROR

#define ROOT_EXPECT_SYSERROR (   expression,
  where,
  expected_diag 
)
Value:
{ \
using namespace ROOT::TestSupport; \
expected_diag); \
expression; \
}
constexpr Int_t kSysError
Definition TError.h:48

Definition at line 184 of file TestSupport.hxx.

◆ ROOT_EXPECT_WARNING

#define ROOT_EXPECT_WARNING (   expression,
  where,
  expected_diag 
)
Value:
{ \
using namespace ROOT::TestSupport; \
CheckDiagsRAII EE(kWarning, where, \
expected_diag); \
expression; \
}
constexpr Int_t kWarning
Definition TError.h:45

Definition at line 161 of file TestSupport.hxx.