BUILD 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. "@abseil-cpp//absl/strings:string_view",
  19. "@llvm-project//llvm:Support",
  20. "@re2",
  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:exe_path",
  33. "//common:init_llvm",
  34. "//common:ostream",
  35. "@abseil-cpp//absl/flags:flag",
  36. "@abseil-cpp//absl/flags:parse",
  37. "@googletest//:gtest",
  38. "@llvm-project//llvm:Support",
  39. ],
  40. )
  41. file_test(
  42. name = "file_test_base_test",
  43. size = "small",
  44. srcs = ["file_test_base_test.cpp"],
  45. tests = glob(["testdata/**"]),
  46. deps = [
  47. ":file_test_base",
  48. "//common:ostream",
  49. "@googletest//:gtest",
  50. "@llvm-project//llvm:Support",
  51. ],
  52. )