From a42c5181b124d85a864fe86f34253b9b8bd28d96 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 29 Aug 2024 08:19:30 -0700 Subject: [PATCH] [Support] Delete FormatVariadicTest Validate sub-test - The subtest will fail assert in Debug builds and validation is disabled in Release builds, so effectively it won't be possible to test validation in a unit test. --- llvm/unittests/Support/FormatVariadicTest.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/llvm/unittests/Support/FormatVariadicTest.cpp b/llvm/unittests/Support/FormatVariadicTest.cpp index 4c648d87fc2de..6ee0d92486741 100644 --- a/llvm/unittests/Support/FormatVariadicTest.cpp +++ b/llvm/unittests/Support/FormatVariadicTest.cpp @@ -710,16 +710,6 @@ TEST(FormatVariadicTest, FormatFilterRange) { EXPECT_EQ("1, 2, 3", formatv("{0}", Range).str()); } -#ifdef NDEBUG // Disable the test in debug builds where it will assert. -TEST(FormatVariadicTest, Validate) { - std::string Str = formatv("{0}", 1, 2).str(); - EXPECT_THAT(Str, HasSubstr("Unexpected number of arguments")); - - Str = formatv("{0} {2}", 1, 2, 3).str(); - EXPECT_THAT(Str, HasSubstr("eplacement indices have holes")); -} -#endif // NDEBUG - namespace { enum class Base { First };