From 6c0901b2ffedc92a48ae20477bf89d7efbc6f257 Mon Sep 17 00:00:00 2001 From: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Date: Tue, 19 Oct 2021 16:09:06 -0700 Subject: [PATCH] Fix build warning in no-RTTI config (#2981) * Fix build warning in no-RTTI config * Fix build warning in no-RTTI config Co-authored-by: Anton Kolesnyk --- sdk/core/azure-core/test/ut/context_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/core/azure-core/test/ut/context_test.cpp b/sdk/core/azure-core/test/ut/context_test.cpp index b48c4279c..440a7f3db 100644 --- a/sdk/core/azure-core/test/ut/context_test.cpp +++ b/sdk/core/azure-core/test/ut/context_test.cpp @@ -437,6 +437,7 @@ TEST(Context, Deadline) } } +#if defined(AZ_CORE_RTTI) TEST(Context, PreCondition) { // Get a mismatch type from the context @@ -450,15 +451,14 @@ TEST(Context, PreCondition) int value; // Type-safe assert requires RTTI build -#if defined(AZ_CORE_RTTI) #if defined(NDEBUG) // Release build won't provide assert msg ASSERT_DEATH(c2.TryGetValue(key, value), ""); #else ASSERT_DEATH(c2.TryGetValue(key, value), "Type mismatch for Context::TryGetValue"); #endif -#endif } +#endif TEST(Context, KeyTypePairPrecondition) {