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. .bazelrcbazel run :magic --config=lldb
