From 248ad447b102da8aa226993baaad0663cea03d19 Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Sat, 1 Feb 2025 18:54:44 -0600 Subject: [PATCH] Work around bazel crap --- test/BUILD.bazel | 3 +++ test/unit/lib/formatting.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/test/BUILD.bazel b/test/BUILD.bazel index cbe3384..c69cf32 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -21,5 +21,8 @@ cc_test( "unit/lib/formatting.cpp", "unit/lib/nullable.cpp" ], + local_defines = [ + "CPPTRACE_NO_TEST_SNIPPETS" + ], linkstatic = 1, ) \ No newline at end of file diff --git a/test/unit/lib/formatting.cpp b/test/unit/lib/formatting.cpp index a2cdee4..ca4292e 100644 --- a/test/unit/lib/formatting.cpp +++ b/test/unit/lib/formatting.cpp @@ -96,6 +96,7 @@ TEST(FormatterTest, ObjectAddresses) { ); } +#ifndef CPPTRACE_NO_TEST_SNIPPETS TEST(FormatterTest, Snippets) { cpptrace::stacktrace trace; unsigned line = __LINE__ + 1; @@ -167,6 +168,7 @@ TEST(FormatterTest, Snippets) { ) ); } +#endif TEST(FormatterTest, Colors) { auto formatter = cpptrace::formatter{}