5#if !WITH_LOW_LEVEL_TESTS
8#include "Misc/AssertionMacros.h"
10#define IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE_LLT( TClass, PrettyName, TFlags, FileName, LineNumber )
11 class TClass : public FAutomationTestBase
14 TClass( const FString& InName)
15 : FAutomationTestBase( InName, false )
17 TestFlags = ExtractAutomationTestFlags(TFlags);
18 PrettyNameDotNotation = FString(PrettyName).Replace(TEXT("::"), TEXT("."));
19 if (!(TestFlags & EAutomationTestFlags::ApplicationContextMask))
21 TestFlags |= EAutomationTestFlags::ApplicationContextMask;
23 if (!(TestFlags & EAutomationTestFlags::FilterMask))
25 TestFlags |= EAutomationTestFlags::EngineFilter;
28 virtual uint32 GetTestFlags() const override { return TestFlags; }
29 virtual bool IsStressTest() const { return false; }
30 virtual uint32 GetRequiredDeviceNum() const override { return 1
; }
31 virtual FString GetTestSourceFileName() const override { return FileName; }
32 virtual int32 GetTestSourceFileLine() const override { return LineNumber; }
34 virtual void GetTests(TArray<FString>& OutBeautifiedNames, TArray <FString>& OutTestCommands) const override
36 OutBeautifiedNames.Add(PrettyNameDotNotation);
37 OutTestCommands.Add(FString());
39 void TestBody(const FString& Parameters);
40 virtual bool RunTest(const FString& Parameters) {
44 virtual FString GetBeautifiedTestName() const override { return PrettyNameDotNotation; }
47 FString PrettyNameDotNotation;
51#define LLT_JOIN_INNER(Prefix, Counter) Prefix##Counter
53#define TEST_CASE_NAMED(TClass, StrName, PrettyName, TFlags)
59 void TClass::TestBody(const FString& Parameters)
62#define TEST_CASE_GENERATED_NAME_UNIQUE LLT_JOIN(FLLTAdaptedTest, __COUNTER__)
63#define LLT_STR(Macro) #Macro
64#define LLT_STR_EXPAND(Macro) LLT_STR(Macro)
68#define CHECK(Expr) if (!(Expr)) { FAutomationTestFramework::Get().GetCurrentTest()->AddError(TEXT("Condition failed")); }
69#define CHECK_FALSE(Expr) if (Expr) { FAutomationTestFramework::Get().GetCurrentTest()->AddError(TEXT("Condition expected to return false but returned true")); }
70#define REQUIRE(Expr) if (!(Expr)) { FAutomationTestFramework::Get().GetCurrentTest()->AddError(TEXT("Required condition failed, interrupting test")); return; }
72#define SECTION(Text) AddInfo(TEXT(Text));
#define TEST_CASE_NAMED(TClass, StrName, PrettyName, TFlags)
#define LLT_STR_EXPAND(Macro)
#define LLT_JOIN(Prefix, Counter)
#define TEST_CASE_GENERATED_NAME_UNIQUE_STR
#define IMPLEMENT_SIMPLE_AUTOMATION_TEST_PRIVATE_LLT(TClass, PrettyName, TFlags, FileName, LineNumber)
#define TEST_CASE_GENERATED_NAME_UNIQUE
#define LLT_JOIN_INNER(Prefix, Counter)