Fixes AzCore for MSVC
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -100,6 +100,7 @@ namespace JsonSerializationTests
|
||||
AZ::AllocatorInstance<AZ::PoolAllocator>::Destroy();
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<AZ::Data::Asset<TestAssetData>>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Asset>();
|
||||
|
||||
@@ -866,18 +866,8 @@ namespace UnitTest
|
||||
namespace Benchmark
|
||||
{
|
||||
class PathBenchmarkFixture
|
||||
: public ::benchmark::Fixture
|
||||
, public ::UnitTest::AllocatorsBase
|
||||
: public ::UnitTest::AllocatorsBenchmarkFixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
{
|
||||
::UnitTest::AllocatorsBase::SetupAllocator();
|
||||
}
|
||||
void TearDown([[maybe_unused]] const ::benchmark::State& state) override
|
||||
{
|
||||
::UnitTest::AllocatorsBase::TeardownAllocator();
|
||||
}
|
||||
protected:
|
||||
AZStd::fixed_vector<const char*, 20> m_appendPaths{ "foo", "bar", "baz", "bazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
|
||||
"boo/bar/base", "C:\\path\\to\\O3DE", "C", "\\\\", "/", R"(test\\path/with\mixed\separators)" };
|
||||
|
||||
@@ -1704,7 +1704,7 @@ namespace Benchmark
|
||||
static const AZ::u32 MEDIUM_NUMBER_OF_JOBS = 1024;
|
||||
static const AZ::u32 LARGE_NUMBER_OF_JOBS = 16384;
|
||||
|
||||
void SetUp([[maybe_unused]] ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
AllocatorInstance<PoolAllocator>::Create();
|
||||
AllocatorInstance<ThreadPoolAllocator>::Create();
|
||||
@@ -1749,8 +1749,16 @@ namespace Benchmark
|
||||
return randomDepthDistribution(randomDepthGenerator);
|
||||
});
|
||||
}
|
||||
void SetUp(::benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(const ::benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
void TearDown([[maybe_unused]] ::benchmark::State& state) override
|
||||
void internalTearDown()
|
||||
{
|
||||
JobContext::SetGlobalContext(nullptr);
|
||||
|
||||
@@ -1763,6 +1771,14 @@ namespace Benchmark
|
||||
AllocatorInstance<ThreadPoolAllocator>::Destroy();
|
||||
AllocatorInstance<PoolAllocator>::Destroy();
|
||||
}
|
||||
void TearDown(::benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
void TearDown(const ::benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
|
||||
protected:
|
||||
inline void RunCalculatePiJob(AZ::s32 depth, AZ::s8 priority)
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathFrustum
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testFrustum = AZ::Frustum(AZ::ViewFrustumAttributes(AZ::Transform::CreateIdentity(), 1.0f, 2.0f * atanf(0.5f), 10.0f, 90.0f));
|
||||
|
||||
@@ -40,6 +39,15 @@ namespace Benchmark
|
||||
return data;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct Data
|
||||
{
|
||||
|
||||
@@ -23,8 +23,7 @@ namespace Benchmark
|
||||
class BM_MathMatrix3x3
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -44,6 +43,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -21,8 +21,7 @@ namespace Benchmark
|
||||
class BM_MathMatrix3x4
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -58,6 +57,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -20,8 +20,7 @@ namespace Benchmark
|
||||
class BM_MathMatrix4x4
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -41,6 +40,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathObb
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_position.Set(1.0f, 2.0f, 3.0f);
|
||||
m_rotation = AZ::Quaternion::CreateRotationZ(AZ::Constants::QuarterPi);
|
||||
@@ -28,6 +27,16 @@ namespace Benchmark
|
||||
m_obb = AZ::Obb::CreateFromPositionRotationAndHalfLengths(m_position, m_rotation, m_halfLengths);
|
||||
}
|
||||
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
AZ::Obb m_obb;
|
||||
AZ::Vector3 m_position;
|
||||
AZ::Quaternion m_rotation;
|
||||
|
||||
@@ -18,14 +18,7 @@ namespace Benchmark
|
||||
class BM_MathPlane
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
BM_MathPlane()
|
||||
{
|
||||
const unsigned int seed = 1;
|
||||
rng = std::mt19937_64(seed);
|
||||
}
|
||||
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
for (int i = 0; i < m_numIters; ++i)
|
||||
{
|
||||
@@ -39,7 +32,7 @@ namespace Benchmark
|
||||
m_distance = unif(rng);
|
||||
m_dists.push_back(m_distance);
|
||||
|
||||
//set these differently so they don't overlap with same values as other vectors
|
||||
// set these differently so they don't overlap with same values as other vectors
|
||||
m_normal = AZ::Vector3(unif(rng), unif(rng), unif(rng));
|
||||
m_normal.Normalize();
|
||||
m_distance = unif(rng);
|
||||
@@ -47,6 +40,21 @@ namespace Benchmark
|
||||
m_planes.push_back(m_plane);
|
||||
}
|
||||
}
|
||||
public:
|
||||
BM_MathPlane()
|
||||
{
|
||||
const unsigned int seed = 1;
|
||||
rng = std::mt19937_64(seed);
|
||||
}
|
||||
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
AZ::Plane m_plane;
|
||||
AZ::Vector3 m_normal;
|
||||
|
||||
@@ -17,8 +17,7 @@ namespace Benchmark
|
||||
class BM_MathQuaternion
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_quatDataArray.resize(1000);
|
||||
|
||||
@@ -42,6 +41,15 @@ namespace Benchmark
|
||||
return quatData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct QuatData
|
||||
{
|
||||
|
||||
@@ -35,8 +35,7 @@ namespace Benchmark
|
||||
class BM_MathShapeIntersection
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -58,6 +57,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -22,8 +22,7 @@ namespace Benchmark
|
||||
class BM_MathTransform
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_testDataArray.resize(1000);
|
||||
|
||||
@@ -51,6 +50,15 @@ namespace Benchmark
|
||||
return testData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct TestData
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathVector2
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_vecDataArray.resize(1000);
|
||||
|
||||
@@ -37,6 +36,15 @@ namespace Benchmark
|
||||
return vecData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct VecData
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathVector3
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_vecDataArray.resize(1000);
|
||||
|
||||
@@ -37,6 +36,15 @@ namespace Benchmark
|
||||
return vecData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct VecData
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace Benchmark
|
||||
class BM_MathVector4
|
||||
: public benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
m_vecDataArray.resize(1000);
|
||||
|
||||
@@ -38,6 +37,15 @@ namespace Benchmark
|
||||
return vecData;
|
||||
});
|
||||
}
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
struct VecData
|
||||
{
|
||||
|
||||
@@ -120,19 +120,34 @@ namespace Benchmark
|
||||
class HphaSchemaBenchmarkFixture
|
||||
: public ::benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp(const ::benchmark::State& state) override
|
||||
void internalSetUp()
|
||||
{
|
||||
AZ_UNUSED(state);
|
||||
AZ::AllocatorInstance<HphaSchema_TestAllocator>::Create();
|
||||
}
|
||||
|
||||
void TearDown(const ::benchmark::State& state) override
|
||||
void internalTearDown()
|
||||
{
|
||||
AZ_UNUSED(state);
|
||||
AZ::AllocatorInstance<HphaSchema_TestAllocator>::Destroy();
|
||||
}
|
||||
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void TearDown(const benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
void TearDown(benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
|
||||
static void BM_Allocations(benchmark::State& state, const AllocationSizeArray& allocationArray)
|
||||
{
|
||||
AZStd::vector<void*> allocations;
|
||||
|
||||
+21
-13
@@ -1155,6 +1155,21 @@ namespace Benchmark
|
||||
{
|
||||
class StorageDriveWindowsFixture : public benchmark::Fixture
|
||||
{
|
||||
void internalTearDown()
|
||||
{
|
||||
using namespace AZ::IO;
|
||||
|
||||
AZStd::string temp;
|
||||
m_absolutePath.swap(temp);
|
||||
|
||||
delete m_streamer;
|
||||
|
||||
SystemFile::Delete(TestFileName);
|
||||
|
||||
AZ::IO::FileIOBase::SetInstance(nullptr);
|
||||
AZ::IO::FileIOBase::SetInstance(m_previousFileIO);
|
||||
delete m_fileIO;
|
||||
}
|
||||
public:
|
||||
constexpr static const char* TestFileName = "StreamerBenchmark.bin";
|
||||
constexpr static size_t FileSize = 64_mib;
|
||||
@@ -1197,20 +1212,13 @@ namespace Benchmark
|
||||
}
|
||||
}
|
||||
|
||||
void TearDown([[maybe_unused]] const ::benchmark::State& state) override
|
||||
void TearDown(const benchmark::State&) override
|
||||
{
|
||||
using namespace AZ::IO;
|
||||
|
||||
AZStd::string temp;
|
||||
m_absolutePath.swap(temp);
|
||||
|
||||
delete m_streamer;
|
||||
|
||||
SystemFile::Delete(TestFileName);
|
||||
|
||||
AZ::IO::FileIOBase::SetInstance(nullptr);
|
||||
AZ::IO::FileIOBase::SetInstance(m_previousFileIO);
|
||||
delete m_fileIO;
|
||||
internalTearDown();
|
||||
}
|
||||
void TearDown(benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
|
||||
void RepeatedlyReadFile(benchmark::State& state)
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace JsonSerializationTests
|
||||
features.m_fixedSizeArray = true;
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<T>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<T>();
|
||||
@@ -243,6 +244,7 @@ namespace JsonSerializationTests
|
||||
])";
|
||||
}
|
||||
|
||||
using ArraySerializerTestDescriptionBase<AZStd::array<BaseClass2*, 4>>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
Base::Reflect(context);
|
||||
@@ -299,6 +301,7 @@ namespace JsonSerializationTests
|
||||
AZ::JsonArraySerializer m_serializer;
|
||||
|
||||
public:
|
||||
using BaseJsonSerializerFixture::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Array>();
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace JsonSerializationTests
|
||||
return "[188, 288, 388]";
|
||||
}
|
||||
|
||||
using BasicContainerConformityTestDescriptor<Container>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Container>();
|
||||
@@ -133,6 +134,7 @@ namespace JsonSerializationTests
|
||||
return "[188, 288, 388]";
|
||||
}
|
||||
|
||||
using BasicContainerConformityTestDescriptor<Container>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Container>();
|
||||
@@ -225,6 +227,7 @@ namespace JsonSerializationTests
|
||||
features.m_supportsPartialInitialization = true;
|
||||
}
|
||||
|
||||
using BasicContainerConformityTestDescriptor<Container>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
SimpleClass::Reflect(context, true);
|
||||
@@ -291,6 +294,7 @@ namespace JsonSerializationTests
|
||||
using Container = AZStd::vector<SimpleClass>;
|
||||
using BaseClassContainer = AZStd::vector<AZStd::shared_ptr<BaseClass>>;
|
||||
|
||||
using JsonBasicContainerSerializerTests::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
SimpleClass::Reflect(serializeContext, true);
|
||||
@@ -352,6 +356,7 @@ namespace JsonSerializationTests
|
||||
static constexpr size_t ContainerSize = 4;
|
||||
using Container = AZStd::fixed_vector<int, ContainerSize>;
|
||||
|
||||
using JsonBasicContainerSerializerTests::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
serializeContext->RegisterGenericType<Container>();
|
||||
@@ -387,6 +392,7 @@ namespace JsonSerializationTests
|
||||
public:
|
||||
using Set = AZStd::set<int>;
|
||||
|
||||
using JsonBasicContainerSerializerTests::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
serializeContext->RegisterGenericType<Set>();
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace JsonSerializationTests
|
||||
BaseJsonSerializerFixture::TearDown();
|
||||
}
|
||||
|
||||
using BaseJsonSerializerFixture::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
serializeContext->Class<BoolPointerWrapper>()
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace JsonSerializationTests
|
||||
BaseJsonSerializerFixture::TearDown();
|
||||
}
|
||||
|
||||
using BaseJsonSerializerFixture::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
serializeContext->Class<DoublePointerWrapper>()
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace JsonSerializationTests
|
||||
features.m_supportsPartialInitialization = false;
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<Map>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Map>();
|
||||
@@ -247,6 +248,7 @@ namespace JsonSerializationTests
|
||||
features.m_supportsPartialInitialization = true;
|
||||
}
|
||||
|
||||
using MapBaseTestDescription<T<SimpleClass*, SimpleClass*>, Serializer>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
SimpleClass::Reflect(context, true);
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace JsonSerializationTests
|
||||
return AZStd::make_shared<SmartPointer>();
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<SmartPointer>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<SmartPointer>();
|
||||
@@ -102,6 +103,7 @@ namespace JsonSerializationTests
|
||||
return *lhs == *rhs;
|
||||
}
|
||||
|
||||
using Base::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
SimpleClass::Reflect(context, true);
|
||||
@@ -176,6 +178,7 @@ namespace JsonSerializationTests
|
||||
features.m_supportsPartialInitialization = true;
|
||||
}
|
||||
|
||||
using SmartPointerBaseTestDescription<T<BaseClass>>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
SimpleInheritence::Reflect(context, true);
|
||||
@@ -340,6 +343,7 @@ namespace JsonSerializationTests
|
||||
features.m_supportsPartialInitialization = true;
|
||||
}
|
||||
|
||||
using SmartPointerBaseTestDescription<T<BaseClass2>>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
MultipleInheritence::Reflect(context, true);
|
||||
@@ -513,7 +517,8 @@ namespace JsonSerializationTests
|
||||
public:
|
||||
using SmartPointer = typename SmartPointerSimpleDerivedClassTestDescription<AZStd::shared_ptr>::SmartPointer;
|
||||
using InstanceSmartPointer = AZStd::shared_ptr<SimpleInheritence>;
|
||||
|
||||
|
||||
using BaseJsonSerializerFixture::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
m_description.Reflect(context);
|
||||
|
||||
@@ -72,6 +72,7 @@ namespace JsonSerializationTests
|
||||
TupleSerializerTestsInternal::ConfigureFeatures(features);
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<AZStd::pair<int, double>>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->Class<PairPlaceholder>()->Field("pair", &PairPlaceholder::m_pair);
|
||||
@@ -126,6 +127,7 @@ namespace JsonSerializationTests
|
||||
TupleSerializerTestsInternal::ConfigureFeatures(features);
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<Tuple>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Tuple>();
|
||||
@@ -344,6 +346,7 @@ namespace JsonSerializationTests
|
||||
features.m_enableNewInstanceTests = false;
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->Class<TupleClass>()
|
||||
@@ -477,6 +480,7 @@ namespace JsonSerializationTests
|
||||
features.m_typeToInject = rapidjson::kNullType;
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<Tuple>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Tuple>();
|
||||
@@ -535,6 +539,7 @@ namespace JsonSerializationTests
|
||||
BaseJsonSerializerFixture::TearDown();
|
||||
}
|
||||
|
||||
using BaseJsonSerializerFixture::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
SimpleClass::Reflect(serializeContext, true);
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace JsonSerializationTests
|
||||
features.m_supportsPartialInitialization = false;
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<AZStd::unordered_set<int>>::Reflect;
|
||||
void Reflect(AZStd::unique_ptr<AZ::SerializeContext>& context) override
|
||||
{
|
||||
context->RegisterGenericType<Set>();
|
||||
@@ -108,6 +109,7 @@ namespace JsonSerializationTests
|
||||
context->RegisterGenericType<MultiSet>();
|
||||
}
|
||||
|
||||
using JsonSerializerConformityTestDescriptor<MultiSet>::Reflect;
|
||||
bool AreEqual(const MultiSet& lhs, const MultiSet& rhs) override
|
||||
{
|
||||
return
|
||||
@@ -139,6 +141,7 @@ namespace JsonSerializationTests
|
||||
BaseJsonSerializerFixture::TearDown();
|
||||
}
|
||||
|
||||
using BaseJsonSerializerFixture::RegisterAdditional;
|
||||
void RegisterAdditional(AZStd::unique_ptr<AZ::SerializeContext>& serializeContext) override
|
||||
{
|
||||
serializeContext->RegisterGenericType<Set>();
|
||||
|
||||
@@ -423,6 +423,8 @@ namespace SettingsRegistryTests
|
||||
|
||||
struct : public AZ::SettingsRegistryInterface::Visitor
|
||||
{
|
||||
using AZ::SettingsRegistryInterface::Visitor::Visit;
|
||||
|
||||
using ValueType [[maybe_unused]] = typename SettingsType<TypeParam>::ValueType;
|
||||
void Visit([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type type, ValueType value) override
|
||||
{
|
||||
@@ -452,6 +454,8 @@ namespace SettingsRegistryTests
|
||||
|
||||
struct : public AZ::SettingsRegistryInterface::Visitor
|
||||
{
|
||||
using AZ::SettingsRegistryInterface::Visitor::Visit;
|
||||
|
||||
using ValueType [[maybe_unused]] = typename SettingsType<TypeParam>::ValueType;
|
||||
void Visit([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type type, ValueType value) override
|
||||
{
|
||||
@@ -482,6 +486,7 @@ namespace SettingsRegistryTests
|
||||
|
||||
struct : public AZ::SettingsRegistryInterface::Visitor
|
||||
{
|
||||
using AZ::SettingsRegistryInterface::Visitor::Visit;
|
||||
void Visit([[maybe_unused]] AZStd::string_view path, [[maybe_unused]] AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type type, AZ::s64 value) override
|
||||
{
|
||||
EXPECT_EQ(AZ::SettingsRegistryInterface::Type::Integer, type);
|
||||
@@ -517,6 +522,8 @@ namespace SettingsRegistryTests
|
||||
EXPECT_TRUE(path.ends_with(valueName));
|
||||
return AZ::SettingsRegistryInterface::VisitResponse::Continue;
|
||||
}
|
||||
|
||||
using AZ::SettingsRegistryInterface::Visitor::Visit;
|
||||
void Visit(AZStd::string_view path, AZStd::string_view valueName, AZ::SettingsRegistryInterface::Type , AZStd::string_view)override
|
||||
{
|
||||
EXPECT_TRUE(path.ends_with(valueName));
|
||||
|
||||
@@ -551,19 +551,37 @@ namespace Benchmark
|
||||
{
|
||||
class TaskGraphBenchmarkFixture : public ::benchmark::Fixture
|
||||
{
|
||||
public:
|
||||
void SetUp(benchmark::State&) override
|
||||
void internalSetUp()
|
||||
{
|
||||
executor = new TaskExecutor;
|
||||
graph = new TaskGraph;
|
||||
}
|
||||
|
||||
void TearDown(benchmark::State&) override
|
||||
void internalTearDown()
|
||||
{
|
||||
delete graph;
|
||||
delete executor;
|
||||
}
|
||||
|
||||
public:
|
||||
void SetUp(const benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
void SetUp(benchmark::State&) override
|
||||
{
|
||||
internalSetUp();
|
||||
}
|
||||
|
||||
void TearDown(const benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
void TearDown(benchmark::State&) override
|
||||
{
|
||||
internalTearDown();
|
||||
}
|
||||
|
||||
TaskDescriptor descriptors[4] = { { "critical", "benchmark", TaskPriority::CRITICAL },
|
||||
{ "high", "benchmark", TaskPriority::HIGH },
|
||||
{ "medium", "benchmark", TaskPriority::MEDIUM },
|
||||
|
||||
Reference in New Issue
Block a user