Skip to main content
GoogleTest is Google’s C++ testing and mocking framework: https://google.github.io/googletest/. It even includes a Bazel example in their documentation: https://google.github.io/googletest/quickstart-bazel.html cc_test is the Bazel rule to execute such a test. Let’s add a C++ testing file that exercises the magic.c we wrote already. Here’s an example (written by Claude 3.5 Sonnet)

Debugging with lldb

In order to use lldb we need to perform some setup. .bazelrc
.lldbinit
And run the following command to go into lldb view: bazel run :magic --config=lldb