[FlowSensitive] [StatusOr] Add test fixture target to Bazel (#180302)

This can be used to make sure downstream extensions to the model still
pass the unit tests.
This commit is contained in:
Florian Mayer 2026-02-10 16:27:07 -08:00 committed by GitHub
parent 7952896611
commit 0c884aa2f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -115,6 +115,13 @@ cc_library(
],
)
cc_library(
name = "dataflow_mock_headers",
testonly = 1,
srcs = ["Analysis/FlowSensitive/MockHeaders.cpp"],
hdrs = ["Analysis/FlowSensitive/MockHeaders.h"],
)
cc_library(
name = "dataflow_solver_test",
testonly = 1,
@ -155,6 +162,28 @@ cc_test(
],
)
cc_library(
name = "unchecked_statusor_access_model_test_fixture",
testonly = 1,
srcs = ["Analysis/FlowSensitive/UncheckedStatusOrAccessModelTestFixture.cpp"],
hdrs = ["Analysis/FlowSensitive/UncheckedStatusOrAccessModelTestFixture.h"],
deps = [
":dataflow_mock_headers",
":dataflow_testing_support",
"//clang:analysis",
"//clang:ast",
"//clang:ast_matchers",
"//clang:basic",
"//clang:tooling",
"//llvm:Support",
"//llvm:TestingADT",
"//llvm:TestingAnnotations",
"//llvm:TestingSupport",
"//third-party/unittest:gmock",
"//third-party/unittest:gtest",
],
)
cc_test(
name = "analysis_flow_sensitive_tests",
srcs = glob(