brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 155e61d Raw
61 lines · c
1//===- OmptTester.h - Main header for ompTest usage -------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8///9/// \file10/// This file represents the main header file for usage of the ompTest library.11/// Depending on the build either 'standalone' or GoogleTest headers are12/// included and corresponding main-function macros are defined.13///14//===----------------------------------------------------------------------===//15 16#ifndef OPENMP_TOOLS_OMPTEST_INCLUDE_OMPTTESTER_H17#define OPENMP_TOOLS_OMPTEST_INCLUDE_OMPTTESTER_H18 19#include "AssertMacros.h"20#include "Logging.h"21#include "OmptAliases.h"22#include "OmptAssertEvent.h"23#include "OmptAsserter.h"24#include "OmptCallbackHandler.h"25 26#include <cassert>27#include <iostream>28#include <memory>29#include <string>30#include <thread>31#include <unordered_set>32#include <vector>33 34// Standalone header section35#ifdef OPENMP_LIBOMPTEST_BUILD_STANDALONE36 37#include "OmptTesterStandalone.h"38 39// Define standalone main function (place once at the bottom of a testsuite)40#define OMPTEST_TESTSUITE_MAIN()                                               \41  int main(int argc, char **argv) {                                            \42    Runner R;                                                                  \43    return R.run();                                                            \44  }45 46// GoogleTest header section47#else48 49#include "OmptTesterGoogleTest.h"50 51// Define GoogleTest main function (place once at the bottom of a testsuite)52#define OMPTEST_TESTSUITE_MAIN()                                               \53  int main(int argc, char **argv) {                                            \54    testing::InitGoogleTest(&argc, argv);                                      \55    return RUN_ALL_TESTS();                                                    \56  }57 58#endif59 60#endif61