BUILD 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. "//common:raw_string_ostream",
  19. "@abseil-cpp//absl/strings",
  20. "@abseil-cpp//absl/strings:string_view",
  21. "@llvm-project//llvm:Support",
  22. "@re2",
  23. ],
  24. )
  25. cc_library(
  26. name = "file_test_base",
  27. testonly = 1,
  28. srcs = ["file_test_base.cpp"],
  29. hdrs = ["file_test_base.h"],
  30. deps = [
  31. ":autoupdate",
  32. "//common:check",
  33. "//common:error",
  34. "//common:exe_path",
  35. "//common:init_llvm",
  36. "//common:ostream",
  37. "//common:raw_string_ostream",
  38. "@abseil-cpp//absl/flags:flag",
  39. "@abseil-cpp//absl/flags:parse",
  40. "@googletest//:gtest",
  41. "@llvm-project//llvm:Support",
  42. ],
  43. )
  44. file_test(
  45. name = "file_test_base_test",
  46. size = "small",
  47. srcs = ["file_test_base_test.cpp"],
  48. tests = glob(["testdata/**"]),
  49. deps = [
  50. ":file_test_base",
  51. "//common:ostream",
  52. "@googletest//:gtest",
  53. "@llvm-project//llvm:Support",
  54. ],
  55. )