From 0b7184fdebe8fdd62d91d86b753a2a3fb8362ad4 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 20 Dec 2024 11:28:43 +0100 Subject: [PATCH] Actually check that transition applies in `cc_define_test` (#144) --- examples/cc_define_test/hello_world_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/cc_define_test/hello_world_test.cc b/examples/cc_define_test/hello_world_test.cc index e5a42ff..301d427 100644 --- a/examples/cc_define_test/hello_world_test.cc +++ b/examples/cc_define_test/hello_world_test.cc @@ -17,6 +17,10 @@ using bazel::tools::cpp::runfiles::Runfiles; #endif int main(int argc, char** argv) { + if (std::string(NAME) != "with_cfg") { + std::cerr << "NAME is not set to 'with_cfg'" << std::endl; + return 1; + } if (std::string(std::getenv("MY_VAR")) != "my_value") { std::cerr << "MY_VAR is not set to 'my_value'" << std::endl; return 1;