LLVM OpenMP 22.0.0git
OmptTesterStandalone.h File Reference

This file represents the 'standalone' header variant, defining the actual test classes and their behavior (it does not have external dependencies). More...

#include "OmptAssertEvent.h"
#include "OmptAsserter.h"
#include "OmptTesterGlobals.h"
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  Error
struct  TestCase
 A pretty crude test case abstraction. More...
struct  TestSuite
 A pretty crude test suite abstraction. More...
class  TestRegistrar
 Static class used to register all test cases and provide them to the driver. More...
struct  Registerer
 Hack to register test cases. More...
struct  Runner
 Eventually executes all test suites and cases, should contain logic to skip stuff if needed. More...

Namespaces

namespace  omptest

Macros

#define XQUOTE(str)
 MACROS TO DEFINE A TESTSUITE + TESTCASE (like GoogleTest does)
#define QUOTE(str)
#define TEST_TEMPLATE(SuiteName, CaseName, ExpectedState)
#define TEST(SuiteName, CaseName)
#define TEST_XFAIL(SuiteName, CaseName)

Detailed Description

This file represents the 'standalone' header variant, defining the actual test classes and their behavior (it does not have external dependencies).

Definition in file OmptTesterStandalone.h.

Macro Definition Documentation

◆ QUOTE

#define QUOTE ( str)
Value:
#str

Definition at line 109 of file OmptTesterStandalone.h.

◆ TEST

#define TEST ( SuiteName,
CaseName )
Value:
TEST_TEMPLATE(SuiteName, CaseName, /*ExpectedState=*/Pass)
#define TEST_TEMPLATE(SuiteName, CaseName, ExpectedState)

Definition at line 121 of file OmptTesterStandalone.h.

◆ TEST_TEMPLATE

#define TEST_TEMPLATE ( SuiteName,
CaseName,
ExpectedState )
Value:
struct SuiteName##_##CaseName : public TestCase { \
SuiteName##_##CaseName() \
: TestCase(XQUOTE(CaseName), omptest::AssertState::ExpectedState) {} \
virtual void execImpl() override; \
}; \
static Registerer R_##SuiteName##CaseName(new SuiteName##_##CaseName(), \
#SuiteName); \
void SuiteName##_##CaseName::execImpl()
#define XQUOTE(str)
MACROS TO DEFINE A TESTSUITE + TESTCASE (like GoogleTest does)
A pretty crude test case abstraction.
virtual void execImpl()
TestCase(const std::string &name)

Definition at line 111 of file OmptTesterStandalone.h.

◆ TEST_XFAIL

#define TEST_XFAIL ( SuiteName,
CaseName )
Value:
TEST_TEMPLATE(SuiteName, CaseName, /*ExpectedState=*/Fail)

Definition at line 123 of file OmptTesterStandalone.h.

◆ XQUOTE

#define XQUOTE ( str)
Value:
QUOTE(str)
#define QUOTE(str)

MACROS TO DEFINE A TESTSUITE + TESTCASE (like GoogleTest does)

Definition at line 108 of file OmptTesterStandalone.h.