BUILD 1.4 KB

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