BUILD 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #
  5. # Trivial, single-file testing libraries. More complex libraries should get
  6. # their own directory.
  7. package(default_visibility = ["//visibility:public"])
  8. # This does extra initialization on top of googletest's gtest_main in order to
  9. # provide stack traces on unexpected exits, because we normally rely on LLVM
  10. # code for that.
  11. #
  12. # This replaces "@com_google_googletest//:gtest_main";
  13. # "@com_google_googletest//:gtest" should still be used directly.
  14. cc_library(
  15. name = "gtest_main",
  16. testonly = 1,
  17. srcs = ["gtest_main.cpp"],
  18. deps = [
  19. "@com_google_googletest//:gtest",
  20. "@llvm-project//llvm:Support",
  21. ],
  22. )
  23. cc_library(
  24. name = "test_raw_ostream",
  25. testonly = 1,
  26. hdrs = ["test_raw_ostream.h"],
  27. deps = [
  28. "//common:ostream",
  29. "@com_google_googletest//:gtest",
  30. "@llvm-project//llvm:Support",
  31. ],
  32. )
  33. cc_test(
  34. name = "test_raw_ostream_test",
  35. srcs = ["test_raw_ostream_test.cpp"],
  36. deps = [
  37. ":test_raw_ostream",
  38. "//testing/util:gtest_main",
  39. "@com_google_googletest//:gtest",
  40. ],
  41. )