Files
neil henning 735dba3d91 Remove the older and unused pragma approach to enabling AutoRTFM.
This pragma didn't work with our unity builds, and we moved away from it anyway.

#rb michael.nicolella

[CL 32322029 by neil henning in ue5-main branch]
2024-03-19 07:54:11 -04:00

28 lines
399 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#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);
}