4#ifndef _Stroika_TestHarness_h_
5#define _Stroika_TestHarness_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
12#if qStroika_HasComponent_googletest
13#define GTEST_DONT_DEFINE_TEST 1
14#if defined(__clang_major__) and (20 < __clang_major__)
15DISABLE_COMPILER_CLANG_WARNING_START (
"clang diagnostic ignored \"-Wcharacter-conversion\"")
17#include <gtest/gtest.h>
18#if defined(__clang_major__) and (20 < __clang_major__)
19DISABLE_COMPILER_CLANG_WARNING_END (
"clang diagnostic ignored \"-Wcharacter-conversion\"")
23#include "Stroika/Foundation/Common/Common.h"
29namespace Stroika::Frameworks::Test {
45 vector<string> Setup (
int argc,
const char* argv[]);
51 [[deprecated (
"Since Strokka v3.0d5 - just use gtest")]]
int PrintPassOrFail (
void (*regressionTest) ());
57 void Test_ (
bool failIfFalse,
bool isFailureElseWarning,
const wchar_t* regressionTestText,
const wchar_t* fileName,
int lineNum);
58 void VerifyTestResultWarning_ (
bool failIfFalse,
bool isFailureElseWarning,
const wchar_t* regressionTestText,
59 const wchar_t* fileName,
int lineNum);
64#define VerifyTestResult(c) \
65 Stroika::Frameworks::Test::Private_::Test_ (!!(c), true, Stroika_Foundation_Debug_Widen (#c), Stroika_Foundation_Debug_Widen (__FILE__), __LINE__)
69#define VerifyTestResultWarning(c) \
70 Stroika::Frameworks::Test::Private_::VerifyTestResultWarning_ (!!(c), false, Stroika_Foundation_Debug_Widen (#c), \
71 Stroika_Foundation_Debug_Widen (__FILE__), __LINE__)
76 void WarnTestIssue (
const char* issue);
77 void WarnTestIssue (
const wchar_t* issue);
78 void WarnTestIssue (
const Foundation::Characters::String& issue);