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

32 lines
632 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma autortfm
#include "Catch2Includes.h"
#include <AutoRTFM/AutoRTFM.h>
#include <unordered_set>
using namespace std;
TEST_CASE("UnorderedSet")
{
constexpr unsigned Count = 100;
unordered_set<unsigned> MySet;
AutoRTFM::Commit([&] ()
{
unordered_set<unsigned> MySetInner;
for (unsigned Index = Count; Index--;)
{
MySetInner.insert(Index);
}
MySet = MySetInner;
});
REQUIRE(MySet.size() == Count);
for (unsigned Index = Count; Index--;)
{
REQUIRE(MySet.count(Index) == 1);
}
}