Skip to content

Commit

Permalink
Refactor name_resovler_test so that tests get descriptors from the cu…
Browse files Browse the repository at this point in the history
…stom DescriptorPool instead of from the C++ generated descriptors.

PiperOrigin-RevId: 700798766
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Nov 27, 2024
1 parent 8ccca39 commit 6eae23c
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 240 deletions.
62 changes: 7 additions & 55 deletions src/google/protobuf/compiler/java/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix")
load("//bazel:cc_proto_library.bzl", "cc_proto_library")
load("//bazel:proto_library.bzl", "proto_library")
load("//build_defs:cpp_opts.bzl", "COPTS")

package(
Expand Down Expand Up @@ -252,69 +250,23 @@ cc_test(
deps = [
":helpers",
":java",
":test_file_name_2024_cc_proto",
":test_file_name_cc_proto",
":test_multiple_file_no_cc_proto",
":test_multiple_file_yes_cc_proto",
"//src/google/protobuf/compiler:command_line_interface",
"//:protobuf",
"//src/google/protobuf",
"//src/google/protobuf:port",
"//src/google/protobuf/compiler:importer",
"//src/google/protobuf/io",
"//src/google/protobuf/io:tokenizer",
"//src/google/protobuf/stubs:lite",
"//src/google/protobuf/testing",
"//src/google/protobuf/testing:file",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)

proto_library(
name = "test_file_name_proto",
srcs = ["test_file_name.proto"],
strip_import_prefix = "/src",
)

cc_proto_library(
name = "test_file_name_cc_proto",
deps = [":test_file_name_proto"],
)

proto_library(
name = "test_file_name_2024_proto",
srcs = ["test_file_name_2024.proto"],
strip_import_prefix = "/src",
)

cc_proto_library(
name = "test_file_name_2024_cc_proto",
deps = [":test_file_name_2024_proto"],
)

proto_library(
name = "test_multiple_file_no_proto",
testonly = 1,
srcs = ["test_multiple_file_no.proto"],
strip_import_prefix = "/src",
)

cc_proto_library(
name = "test_multiple_file_no_cc_proto",
testonly = 1,
deps = [":test_multiple_file_no_proto"],
)

proto_library(
name = "test_multiple_file_yes_proto",
testonly = 1,
srcs = ["test_multiple_file_yes.proto"],
strip_import_prefix = "/src",
)

cc_proto_library(
name = "test_multiple_file_yes_cc_proto",
testonly = 1,
deps = [":test_multiple_file_yes_proto"],
)

################################################################################
# Distribution packaging
################################################################################
Expand Down
Loading

0 comments on commit 6eae23c

Please sign in to comment.