Files
brandon schaefer 3e8cf406a6 Add a header to ensure we include our MinWindows and Windows type headers *before* catch_amalgamated.hpp includes its Windows.h stuff
Fix GraphBenchmark shadow warnings

#rb Neil.Henning, Jason.Weiler
#preflight none

[CL 24723829 by brandon schaefer in ue5-main branch]
2023-03-20 17:13:55 -04:00

30 lines
417 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma autortfm
#include "Catch2Includes.h"
#include <AutoRTFM/AutoRTFM.h>
#include <inttypes.h>
#pragma pack(1)
struct Foo
{
uint8_t a;
uint64_t b;
};
TEST_CASE("PackedPointer")
{
Foo foo;
foo.a = 1;
foo.b = 2;
AutoRTFM::Commit([&] ()
{
foo.a++;
foo.b++;
});
REQUIRE(foo.a == 2);
REQUIRE(foo.b == 3);
}