BUILD 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. load("@rules_cc//cc:defs.bzl", "cc_library")
  5. load("rules.bzl", "file_test")
  6. package(default_visibility = ["//visibility:public"])
  7. cc_library(
  8. name = "autoupdate",
  9. testonly = 1,
  10. srcs = ["autoupdate.cpp"],
  11. hdrs = [
  12. "autoupdate.h",
  13. "line.h",
  14. ],
  15. deps = [
  16. "//common:check",
  17. "//common:ostream",
  18. "@com_google_absl//absl/strings:string_view",
  19. "@com_googlesource_code_re2//:re2",
  20. "@llvm-project//llvm:Support",
  21. ],
  22. )
  23. cc_library(
  24. name = "file_test_base",
  25. testonly = 1,
  26. srcs = ["file_test_base.cpp"],
  27. hdrs = ["file_test_base.h"],
  28. deps = [
  29. ":autoupdate",
  30. "//common:check",
  31. "//common:error",
  32. "//common:ostream",
  33. "@com_google_absl//absl/flags:flag",
  34. "@com_google_absl//absl/flags:parse",
  35. "@com_google_googletest//:gtest",
  36. "@llvm-project//llvm:Support",
  37. ],
  38. )
  39. file_test(
  40. name = "file_test_base_test",
  41. size = "small",
  42. srcs = ["file_test_base_test.cpp"],
  43. tests = glob(["testdata/**"]),
  44. deps = [
  45. ":file_test_base",
  46. "//common:ostream",
  47. "@com_google_googletest//:gtest",
  48. "@llvm-project//llvm:Support",
  49. ],
  50. )