mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
This is just a cleanup. Since we now have a testing directory, I think this is a better home for testonly libraries than //common. (I was thinking about this when I was considering adding more test_raw_ostream deps)
86 lines
1.9 KiB
Python
86 lines
1.9 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
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
cc_library(
|
|
name = "diagnostic_emitter",
|
|
hdrs = ["diagnostic_emitter.h"],
|
|
deps = [
|
|
":diagnostic_kind",
|
|
"//common:check",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "diagnostic_emitter_test",
|
|
size = "small",
|
|
srcs = ["diagnostic_emitter_test.cpp"],
|
|
deps = [
|
|
":diagnostic_emitter",
|
|
":mocks",
|
|
"//testing/util:gtest_main",
|
|
"@com_google_googletest//:gtest",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "diagnostic_kind",
|
|
srcs = ["diagnostic_kind.cpp"],
|
|
hdrs = ["diagnostic_kind.h"],
|
|
textual_hdrs = [
|
|
"diagnostic_kind.def",
|
|
],
|
|
deps = [
|
|
"//common:enum_base",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "null_diagnostics",
|
|
hdrs = ["null_diagnostics.h"],
|
|
deps = [
|
|
":diagnostic_emitter",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "sorting_diagnostic_consumer",
|
|
hdrs = ["sorting_diagnostic_consumer.h"],
|
|
deps = [
|
|
":diagnostic_emitter",
|
|
"//common:check",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "sorting_diagnostic_consumer_test",
|
|
size = "small",
|
|
srcs = ["sorting_diagnostic_consumer_test.cpp"],
|
|
deps = [
|
|
":diagnostic_emitter",
|
|
":mocks",
|
|
":sorting_diagnostic_consumer",
|
|
"//testing/util:gtest_main",
|
|
"@com_google_googletest//:gtest",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "mocks",
|
|
testonly = 1,
|
|
srcs = ["mocks.cpp"],
|
|
hdrs = ["mocks.h"],
|
|
deps = [
|
|
":diagnostic_emitter",
|
|
"@com_google_googletest//:gtest",
|
|
"@llvm-project//llvm:Support",
|
|
],
|
|
)
|