diff --git a/common/BUILD b/common/BUILD index bcda208fa0e4..342441bf7fee 100644 --- a/common/BUILD +++ b/common/BUILD @@ -29,7 +29,7 @@ cc_test( srcs = ["check_test.cpp"], deps = [ ":check", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) @@ -54,8 +54,8 @@ cc_test( deps = [ ":enum_base", ":enum_base_test_def", - "//testing/util:gtest_main", - "//testing/util:test_raw_ostream", + "//testing/base:gtest_main", + "//testing/base:test_raw_ostream", "@com_google_googletest//:gtest", ], ) @@ -75,8 +75,8 @@ cc_test( srcs = ["error_test.cpp"], deps = [ ":error", - "//testing/util:gtest_main", - "//testing/util:test_raw_ostream", + "//testing/base:gtest_main", + "//testing/base:test_raw_ostream", "@com_google_googletest//:gtest", ], ) @@ -91,7 +91,7 @@ cc_test( srcs = ["indirect_value_test.cpp"], deps = [ ":indirect_value", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) @@ -106,7 +106,7 @@ cc_test( srcs = ["metaprogramming_test.cpp"], deps = [ ":metaprogramming", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", ], @@ -137,7 +137,7 @@ cc_test( srcs = ["string_helpers_test.cpp"], deps = [ ":string_helpers", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", ], @@ -157,8 +157,8 @@ cc_test( srcs = ["vlog_test.cpp"], deps = [ ":vlog", - "//testing/util:gtest_main", - "//testing/util:test_raw_ostream", + "//testing/base:gtest_main", + "//testing/base:test_raw_ostream", "@com_google_googletest//:gtest", ], ) diff --git a/common/enum_base_test.cpp b/common/enum_base_test.cpp index 5e1911035ca4..ea51e8870c40 100644 --- a/common/enum_base_test.cpp +++ b/common/enum_base_test.cpp @@ -6,7 +6,7 @@ #include -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" namespace Carbon { diff --git a/common/error_test.cpp b/common/error_test.cpp index 1898a4b5c638..186854b38a3a 100644 --- a/common/error_test.cpp +++ b/common/error_test.cpp @@ -6,7 +6,7 @@ #include -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" namespace Carbon::Testing { namespace { diff --git a/common/vlog_test.cpp b/common/vlog_test.cpp index d207ec41fc86..7b8c54b61eca 100644 --- a/common/vlog_test.cpp +++ b/common/vlog_test.cpp @@ -7,7 +7,7 @@ #include #include -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" namespace Carbon::Testing { namespace { diff --git a/explorer/BUILD b/explorer/BUILD index 0fbfe3af62fa..a3dae7c826d8 100644 --- a/explorer/BUILD +++ b/explorer/BUILD @@ -48,8 +48,8 @@ cc_library( deps = [ ":main", "//common:check", + "//testing/base:test_raw_ostream", "//testing/file_test:file_test_base", - "//testing/util:test_raw_ostream", "@com_google_absl//absl/flags:flag", "@com_googlesource_code_re2//:re2", ], diff --git a/explorer/ast/BUILD b/explorer/ast/BUILD index f192094f7c79..ef76b2e2f1a7 100644 --- a/explorer/ast/BUILD +++ b/explorer/ast/BUILD @@ -82,7 +82,7 @@ cc_test( ":ast", ":ast_test_matchers", "//explorer/base:arena", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) @@ -94,7 +94,7 @@ cc_test( ":ast", ":paren_contents", "//explorer/base:arena", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", ], @@ -121,7 +121,7 @@ cc_test( ":ast", ":paren_contents", "//explorer/base:arena", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", ], @@ -134,7 +134,7 @@ cc_test( ":ast", ":paren_contents", "//explorer/base:arena", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", ], diff --git a/explorer/base/BUILD b/explorer/base/BUILD index 0ab0a545723d..dfb7f07cadfe 100644 --- a/explorer/base/BUILD +++ b/explorer/base/BUILD @@ -18,7 +18,7 @@ cc_test( srcs = ["arena_test.cpp"], deps = [ ":arena", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) @@ -36,7 +36,7 @@ cc_test( srcs = ["decompose_test.cpp"], deps = [ ":decompose", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) @@ -56,8 +56,8 @@ cc_test( deps = [ ":error_builders", ":source_location", - "//testing/util:gtest_main", - "//testing/util:test_raw_ostream", + "//testing/base:gtest_main", + "//testing/base:test_raw_ostream", "@com_google_googletest//:gtest", ], ) @@ -96,7 +96,7 @@ cc_test( srcs = ["set_program_phase_raii_test.cpp"], deps = [ ":trace_stream", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) @@ -107,7 +107,7 @@ cc_test( deps = [ ":source_location", ":trace_stream", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) diff --git a/explorer/base/error_builders_test.cpp b/explorer/base/error_builders_test.cpp index 6e46d1078074..4293932d56bf 100644 --- a/explorer/base/error_builders_test.cpp +++ b/explorer/base/error_builders_test.cpp @@ -7,7 +7,7 @@ #include #include "explorer/base/source_location.h" -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" namespace Carbon::Testing { namespace { diff --git a/explorer/file_test.cpp b/explorer/file_test.cpp index 16be4245c17f..66803ea4c91b 100644 --- a/explorer/file_test.cpp +++ b/explorer/file_test.cpp @@ -5,8 +5,8 @@ #include "absl/flags/flag.h" #include "explorer/main.h" #include "re2/re2.h" +#include "testing/base/test_raw_ostream.h" #include "testing/file_test/file_test_base.h" -#include "testing/util/test_raw_ostream.h" ABSL_FLAG(bool, trace, false, "Set to true to run tests with tracing enabled, even if they don't " diff --git a/explorer/fuzzing/BUILD b/explorer/fuzzing/BUILD index 95e7ff2119e7..454ab8ea0678 100644 --- a/explorer/fuzzing/BUILD +++ b/explorer/fuzzing/BUILD @@ -46,9 +46,9 @@ cc_test( deps = [ ":ast_to_proto_lib", "//explorer/syntax", + "//testing/base:test_raw_ostream", "//testing/fuzzing:carbon_cc_proto", "//testing/fuzzing:proto_to_carbon_lib", - "//testing/util:test_raw_ostream", "@com_google_googletest//:gtest", "@com_google_protobuf//:protobuf_headers", ], @@ -80,8 +80,8 @@ cc_test( ], deps = [ ":fuzzer_util", + "//testing/base:gtest_main", "//testing/fuzzing:proto_to_carbon_lib", - "//testing/util:gtest_main", "@com_google_googletest//:gtest", "@com_google_protobuf//:protobuf_headers", "@llvm-project//llvm:Support", diff --git a/explorer/fuzzing/ast_to_proto_test.cpp b/explorer/fuzzing/ast_to_proto_test.cpp index ac149cd9b576..c3d72e36683a 100644 --- a/explorer/fuzzing/ast_to_proto_test.cpp +++ b/explorer/fuzzing/ast_to_proto_test.cpp @@ -15,8 +15,8 @@ #include #include "explorer/syntax/parse.h" +#include "testing/base/test_raw_ostream.h" #include "testing/fuzzing/proto_to_carbon.h" -#include "testing/util/test_raw_ostream.h" namespace Carbon::Testing { namespace { diff --git a/explorer/parse_and_execute/BUILD b/explorer/parse_and_execute/BUILD index 9638c8686566..7ce7d6f18be2 100644 --- a/explorer/parse_and_execute/BUILD +++ b/explorer/parse_and_execute/BUILD @@ -28,7 +28,7 @@ cc_test( srcs = ["parse_and_execute_test.cpp"], deps = [ ":parse_and_execute", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) diff --git a/explorer/syntax/BUILD b/explorer/syntax/BUILD index fc3369dc3d6e..c95d36b93b45 100644 --- a/explorer/syntax/BUILD +++ b/explorer/syntax/BUILD @@ -16,7 +16,7 @@ cc_test( deps = [ ":syntax", "//explorer/base:arena", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) @@ -148,7 +148,7 @@ cc_test( ":parse_test_matchers", ":syntax", "//explorer/ast:ast_test_matchers", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) diff --git a/migrate_cpp/BUILD b/migrate_cpp/BUILD index 084228b2cf8c..8cc0fd5d08b0 100644 --- a/migrate_cpp/BUILD +++ b/migrate_cpp/BUILD @@ -47,7 +47,7 @@ cc_test( srcs = ["rewriter_test.cpp"], deps = [ ":rewriter", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//clang:ast", "@llvm-project//clang:frontend", diff --git a/migrate_cpp/cpp_refactoring/BUILD b/migrate_cpp/cpp_refactoring/BUILD index 4efe8247f049..f1809a3ec79a 100644 --- a/migrate_cpp/cpp_refactoring/BUILD +++ b/migrate_cpp/cpp_refactoring/BUILD @@ -62,7 +62,7 @@ cc_test( deps = [ ":fn_inserter", ":matcher_test_base", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//clang:tooling", ], @@ -84,7 +84,7 @@ cc_test( deps = [ ":for_range", ":matcher_test_base", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//clang:tooling", ], @@ -108,7 +108,7 @@ cc_test( deps = [ ":matcher_test_base", ":var_decl", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//clang:tooling", ], diff --git a/testing/util/BUILD b/testing/base/BUILD similarity index 97% rename from testing/util/BUILD rename to testing/base/BUILD index bddb54ba2559..631cf2062ec8 100644 --- a/testing/util/BUILD +++ b/testing/base/BUILD @@ -39,7 +39,7 @@ cc_test( srcs = ["test_raw_ostream_test.cpp"], deps = [ ":test_raw_ostream", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) diff --git a/testing/util/gtest_main.cpp b/testing/base/gtest_main.cpp similarity index 100% rename from testing/util/gtest_main.cpp rename to testing/base/gtest_main.cpp diff --git a/testing/util/test_raw_ostream.h b/testing/base/test_raw_ostream.h similarity index 86% rename from testing/util/test_raw_ostream.h rename to testing/base/test_raw_ostream.h index a3431cf4ec74..1dec83f0d47e 100644 --- a/testing/util/test_raw_ostream.h +++ b/testing/base/test_raw_ostream.h @@ -2,8 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef CARBON_TESTING_UTIL_TEST_RAW_OSTREAM_H_ -#define CARBON_TESTING_UTIL_TEST_RAW_OSTREAM_H_ +#ifndef CARBON_TESTING_BASE_TEST_RAW_OSTREAM_H_ +#define CARBON_TESTING_BASE_TEST_RAW_OSTREAM_H_ #include @@ -39,4 +39,4 @@ class TestRawOstream : public llvm::raw_svector_ostream { } // namespace Carbon::Testing -#endif // CARBON_TESTING_UTIL_TEST_RAW_OSTREAM_H_ +#endif // CARBON_TESTING_BASE_TEST_RAW_OSTREAM_H_ diff --git a/testing/util/test_raw_ostream_test.cpp b/testing/base/test_raw_ostream_test.cpp similarity index 96% rename from testing/util/test_raw_ostream_test.cpp rename to testing/base/test_raw_ostream_test.cpp index 5023e795fe7a..62b580cd5742 100644 --- a/testing/util/test_raw_ostream_test.cpp +++ b/testing/base/test_raw_ostream_test.cpp @@ -2,7 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" #include #include diff --git a/testing/fuzzing/BUILD b/testing/fuzzing/BUILD index 11df36f7a995..229ef75d4738 100644 --- a/testing/fuzzing/BUILD +++ b/testing/fuzzing/BUILD @@ -52,7 +52,7 @@ cc_test( ":carbon_cc_proto", ":proto_to_carbon_lib", "//common:error", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", ], ) diff --git a/toolchain/diagnostics/BUILD b/toolchain/diagnostics/BUILD index 42a95802cc69..7050ce1318d6 100644 --- a/toolchain/diagnostics/BUILD +++ b/toolchain/diagnostics/BUILD @@ -21,7 +21,7 @@ cc_test( deps = [ ":diagnostic_emitter", ":mocks", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", ], @@ -66,7 +66,7 @@ cc_test( ":diagnostic_emitter", ":mocks", ":sorting_diagnostic_consumer", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", ], diff --git a/toolchain/driver/BUILD b/toolchain/driver/BUILD index a1ec4c3e29c5..5bbc7c37bf14 100644 --- a/toolchain/driver/BUILD +++ b/toolchain/driver/BUILD @@ -45,8 +45,8 @@ cc_test( srcs = ["driver_test.cpp"], deps = [ ":driver", - "//testing/util:gtest_main", - "//testing/util:test_raw_ostream", + "//testing/base:gtest_main", + "//testing/base:test_raw_ostream", "//toolchain/base:yaml_test_helpers", "//toolchain/diagnostics:diagnostic_emitter", "//toolchain/lexer:tokenized_buffer_test_helpers", @@ -62,7 +62,7 @@ cc_fuzz_test( corpus = glob(["fuzzer_corpus/*"]), deps = [ ":driver", - "//testing/util:test_raw_ostream", + "//testing/base:test_raw_ostream", "@llvm-project//llvm:Support", ], ) diff --git a/toolchain/driver/driver_fuzzer.cpp b/toolchain/driver/driver_fuzzer.cpp index 6ab378bbe9b9..3b9debdc90e4 100644 --- a/toolchain/driver/driver_fuzzer.cpp +++ b/toolchain/driver/driver_fuzzer.cpp @@ -10,7 +10,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/raw_ostream.h" -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" #include "toolchain/driver/driver.h" namespace Carbon::Testing { diff --git a/toolchain/driver/driver_test.cpp b/toolchain/driver/driver_test.cpp index 2bab8c39bc11..286e788045fe 100644 --- a/toolchain/driver/driver_test.cpp +++ b/toolchain/driver/driver_test.cpp @@ -10,7 +10,7 @@ #include "llvm/ADT/SmallString.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/SourceMgr.h" -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" #include "toolchain/base/yaml_test_helpers.h" #include "toolchain/diagnostics/diagnostic_emitter.h" diff --git a/toolchain/lexer/BUILD b/toolchain/lexer/BUILD index 08db2a839696..5db349dd874e 100644 --- a/toolchain/lexer/BUILD +++ b/toolchain/lexer/BUILD @@ -26,7 +26,7 @@ cc_test( srcs = ["token_kind_test.cpp"], deps = [ ":token_kind", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", ], @@ -95,7 +95,7 @@ cc_test( ":test_helpers", "//common:check", "//common:ostream", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "//toolchain/diagnostics:diagnostic_emitter", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", @@ -148,7 +148,7 @@ cc_test( ":test_helpers", "//common:check", "//common:ostream", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "//toolchain/diagnostics:diagnostic_emitter", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", @@ -208,8 +208,8 @@ cc_test( deps = [ ":tokenized_buffer", ":tokenized_buffer_test_helpers", - "//testing/util:gtest_main", - "//testing/util:test_raw_ostream", + "//testing/base:gtest_main", + "//testing/base:test_raw_ostream", "//toolchain/base:yaml_test_helpers", "//toolchain/diagnostics:diagnostic_emitter", "//toolchain/diagnostics:mocks", diff --git a/toolchain/lexer/tokenized_buffer_test.cpp b/toolchain/lexer/tokenized_buffer_test.cpp index 18d73222cd0c..0dfecea70838 100644 --- a/toolchain/lexer/tokenized_buffer_test.cpp +++ b/toolchain/lexer/tokenized_buffer_test.cpp @@ -15,7 +15,7 @@ #include "llvm/ADT/SmallString.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/raw_ostream.h" -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" #include "toolchain/base/yaml_test_helpers.h" #include "toolchain/diagnostics/diagnostic_emitter.h" #include "toolchain/diagnostics/mocks.h" diff --git a/toolchain/parser/BUILD b/toolchain/parser/BUILD index 1f7c5d867241..da333ba401fe 100644 --- a/toolchain/parser/BUILD +++ b/toolchain/parser/BUILD @@ -63,8 +63,8 @@ cc_test( ":parse_node_kind", ":parse_tree", "//common:ostream", - "//testing/util:gtest_main", - "//testing/util:test_raw_ostream", + "//testing/base:gtest_main", + "//testing/base:test_raw_ostream", "//toolchain/base:yaml_test_helpers", "//toolchain/diagnostics:diagnostic_emitter", "//toolchain/diagnostics:mocks", @@ -112,7 +112,7 @@ cc_test( srcs = ["precedence_test.cpp"], deps = [ ":precedence", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "//toolchain/lexer:token_kind", "@com_google_googletest//:gtest", ], diff --git a/toolchain/parser/parse_tree_test.cpp b/toolchain/parser/parse_tree_test.cpp index c4e1db2075bc..0d1cb1a5d4c3 100644 --- a/toolchain/parser/parse_tree_test.cpp +++ b/toolchain/parser/parse_tree_test.cpp @@ -9,7 +9,7 @@ #include -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" #include "toolchain/base/yaml_test_helpers.h" #include "toolchain/diagnostics/diagnostic_emitter.h" #include "toolchain/diagnostics/mocks.h" diff --git a/toolchain/semantics/BUILD b/toolchain/semantics/BUILD index 05e5aa6726b5..ae95bcb2e472 100644 --- a/toolchain/semantics/BUILD +++ b/toolchain/semantics/BUILD @@ -117,8 +117,8 @@ cc_test( size = "small", srcs = ["semantics_ir_test.cpp"], deps = [ - "//testing/util:gtest_main", - "//testing/util:test_raw_ostream", + "//testing/base:gtest_main", + "//testing/base:test_raw_ostream", "//toolchain/base:yaml_test_helpers", "//toolchain/driver", "@com_google_googletest//:gtest", diff --git a/toolchain/semantics/semantics_ir_test.cpp b/toolchain/semantics/semantics_ir_test.cpp index 5eeef88bea4c..65e1535c9793 100644 --- a/toolchain/semantics/semantics_ir_test.cpp +++ b/toolchain/semantics/semantics_ir_test.cpp @@ -10,7 +10,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/VirtualFileSystem.h" #include "llvm/Support/raw_ostream.h" -#include "testing/util/test_raw_ostream.h" +#include "testing/base/test_raw_ostream.h" #include "toolchain/base/yaml_test_helpers.h" #include "toolchain/driver/driver.h" diff --git a/toolchain/source/BUILD b/toolchain/source/BUILD index be24c1d17ddd..50b18e829caf 100644 --- a/toolchain/source/BUILD +++ b/toolchain/source/BUILD @@ -20,7 +20,7 @@ cc_test( srcs = ["source_buffer_test.cpp"], deps = [ ":source_buffer", - "//testing/util:gtest_main", + "//testing/base:gtest_main", "@com_google_googletest//:gtest", "@llvm-project//llvm:Support", ],