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{}