You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
added a tls for an ensure handler callback to let the reporting log of ensures to be overridden the following macros are supported in lowlevel tests REQUIRE_ENSURE CHECK_ENSURE REQUIRE_CHECK #rb devin.doucette #preflight 634827c457048bdb82b43ffe [CL 22505260 by joe pribele in ue5-main branch]
20 lines
772 B
C++
20 lines
772 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "TestRunnerOutputDeviceError.h"
|
|
#include "Containers/StringConv.h"
|
|
#include <catch2/internal/catch_assertion_handler.hpp>
|
|
|
|
namespace UE::LowLevelTests
|
|
{
|
|
|
|
//report error back to catch otherwise failed `check`'s don't fail the tests
|
|
//this method is not execute if the debugger is attached
|
|
void FTestRunnerOutputDeviceError::Serialize(const TCHAR* V, ELogVerbosity::Type Verbosity, const FName& Category)
|
|
{
|
|
auto AnsiMessage = StringCast<ANSICHAR>(V);
|
|
Catch::AssertionHandler catchAssertionHandler("", CATCH_INTERNAL_LINEINFO, AnsiMessage.Get(), Catch::ResultDisposition::Normal);
|
|
catchAssertionHandler.handleMessage(Catch::ResultWas::ExplicitFailure, AnsiMessage.Get());
|
|
catchAssertionHandler.complete();
|
|
}
|
|
|
|
} |