summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--absl/strings/internal/str_format/convert_test.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/absl/strings/internal/str_format/convert_test.cc b/absl/strings/internal/str_format/convert_test.cc
index 0d534651..d14ecb24 100644
--- a/absl/strings/internal/str_format/convert_test.cc
+++ b/absl/strings/internal/str_format/convert_test.cc
@@ -1245,9 +1245,16 @@ TEST_F(FormatConvertTest, ExpectedFailures) {
// Sanity check to make sure that we are testing what we think we're testing on
// e.g. the x86_64+glibc platform.
TEST_F(FormatConvertTest, GlibcHasCorrectTraits) {
-#if !defined(__GLIBC__) || !defined(__x86_64__)
- return;
+#if defined(__GLIBC__) && defined(__x86_64__)
+ constexpr bool kIsSupportedGlibc = true;
+#else
+ constexpr bool kIsSupportedGlibc = false;
#endif
+
+ if (!kIsSupportedGlibc) {
+ GTEST_SKIP() << "Test does not support this platform";
+ }
+
const NativePrintfTraits &native_traits = VerifyNativeImplementation();
// If one of the following tests break then it is either because the above PP
// macro guards failed to exclude a new platform (likely) or because something