Files
carbon-lang/diagnostics/BUILD
T
Richard Smith d1757d9979 Add location information to diagnostics. (#385)
Add simple mocking and testing of diagnostic emission to ensure this
works.
2021-03-18 21:05:54 -07:00

48 lines
1.1 KiB
Python

# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
package(default_visibility = ["//visibility:public"])
cc_library(
name = "diagnostic_emitter",
srcs = ["diagnostic_emitter.cpp"],
hdrs = ["diagnostic_emitter.h"],
deps = ["@llvm-project//llvm:Support"],
)
cc_library(
name = "null_diagnostics",
hdrs = ["null_diagnostics.h"],
deps = [
":diagnostic_emitter",
"@llvm-project//llvm:Support",
],
)
cc_library(
name = "mocks",
testonly = 1,
hdrs = ["mocks.h"],
deps = [
":diagnostic_emitter",
"@llvm-project//llvm:Support",
"@llvm-project//llvm:gmock",
],
)
cc_test(
name = "diagnostic_emitter_test",
srcs = ["diagnostic_emitter_test.cpp"],
deps = [
":diagnostic_emitter",
":mocks",
"@llvm-project//llvm:Support",
"@llvm-project//llvm:gmock",
"@llvm-project//llvm:gtest",
"@llvm-project//llvm:gtest_main",
],
)