BUILD 1.4 KB

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