Work around bazel crap

This commit is contained in:
Jeremy Rifkin 2025-02-01 18:54:44 -06:00
parent eb9ebc31a7
commit 248ad447b1
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
2 changed files with 5 additions and 0 deletions

View File

@ -21,5 +21,8 @@ cc_test(
"unit/lib/formatting.cpp", "unit/lib/formatting.cpp",
"unit/lib/nullable.cpp" "unit/lib/nullable.cpp"
], ],
local_defines = [
"CPPTRACE_NO_TEST_SNIPPETS"
],
linkstatic = 1, linkstatic = 1,
) )

View File

@ -96,6 +96,7 @@ TEST(FormatterTest, ObjectAddresses) {
); );
} }
#ifndef CPPTRACE_NO_TEST_SNIPPETS
TEST(FormatterTest, Snippets) { TEST(FormatterTest, Snippets) {
cpptrace::stacktrace trace; cpptrace::stacktrace trace;
unsigned line = __LINE__ + 1; unsigned line = __LINE__ + 1;
@ -167,6 +168,7 @@ TEST(FormatterTest, Snippets) {
) )
); );
} }
#endif
TEST(FormatterTest, Colors) { TEST(FormatterTest, Colors) {
auto formatter = cpptrace::formatter{} auto formatter = cpptrace::formatter{}