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 <antkmsft@users.noreply.github.com>
This commit is contained in:
Anton Kolesnyk 2021-10-19 16:09:06 -07:00 committed by GitHub
parent b477373a9c
commit 6c0901b2ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<int>(key, value), "");
#else
ASSERT_DEATH(c2.TryGetValue<int>(key, value), "Type mismatch for Context::TryGetValue");
#endif
#endif
}
#endif
TEST(Context, KeyTypePairPrecondition)
{