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
 This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
 
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; \
}
const Int_t kError
Definition TError.cxx:38
Install a ROOT diagnostic handler to analyse diagnostics.

Definition at line 154 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; \
}
const Int_t kInfo
Definition TError.cxx:36

Definition at line 170 of file TestSupport.hxx.

◆ ROOT_EXPECT_NODIAG

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

Definition at line 178 of file TestSupport.hxx.

◆ ROOT_EXPECT_SYSERROR

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

Definition at line 185 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; \
}
const Int_t kWarning
Definition TError.cxx:37

Definition at line 162 of file TestSupport.hxx.