Fix layering check for usage of gtest

To satisfy the layering check, we need to depend on :gtest for the headers, in
addition to :gtest_main which provides the main() function.

There are a bunch of formatting changes as a side effect of this, but they
should be harmless.

PiperOrigin-RevId: 594318263
pull/15229/head
Adam Cozzette 1 year ago committed by Copybara-Service
parent 79cc57bf57
commit 4ec9170bcd
  1. 2
      bazel/BUILD
  2. 8
      bazel/build_defs.bzl
  3. 1
      bazel/upb_proto_library_internal/cc_library_func.bzl
  4. 3
      benchmarks/BUILD
  5. 2
      java/internal/testing.bzl
  6. 11
      protos/BUILD
  7. 2
      protos/bazel/BUILD
  8. 1
      protos/bazel/upb_cc_proto_library.bzl
  9. 4
      protos_generator/BUILD
  10. 3
      protos_generator/tests/BUILD
  11. 15
      python/BUILD.bazel
  12. 15
      python/pb_unit_tests/BUILD
  13. 3
      rust/BUILD
  14. 4
      rust/cpp_kernel/BUILD
  15. 5
      rust/test/BUILD
  16. 4
      rust/test/cpp/interop/BUILD
  17. 44
      rust/test/shared/BUILD
  18. 2
      rust/upb_kernel/BUILD
  19. 3
      src/google/protobuf/editions/BUILD
  20. 1
      third_party/utf8_range/BUILD.bazel
  21. 6
      upb/BUILD
  22. 4
      upb/base/BUILD
  23. 4
      upb/collections/BUILD
  24. 7
      upb/hash/BUILD
  25. 13
      upb/io/BUILD
  26. 9
      upb/json/BUILD
  27. 7
      upb/lex/BUILD
  28. 7
      upb/mem/BUILD
  29. 26
      upb/message/BUILD
  30. 7
      upb/mini_descriptor/BUILD
  31. 7
      upb/mini_table/BUILD
  32. 4
      upb/port/BUILD
  33. 7
      upb/reflection/BUILD
  34. 17
      upb/test/BUILD
  35. 4
      upb/text/BUILD
  36. 12
      upb/util/BUILD
  37. 9
      upb/wire/BUILD

@ -52,8 +52,8 @@ bzl_library(
],
deps = [
"@bazel_skylib//lib:paths",
"@rules_proto//proto:defs",
"@bazel_tools//tools/cpp:toolchain_utils.bzl",
"@rules_proto//proto:defs",
],
)

@ -31,8 +31,8 @@ _DEFAULT_COPTS.extend([
UPB_DEFAULT_CPPOPTS = select({
"//upb:windows": [],
# begin:google_only
# # Override default -Oz for release builds on Android.
# "//bazel:android_opt": _DEFAULT_CPPOPTS + ["-O2"],
# # Override default -Oz for release builds on Android.
# "//bazel:android_opt": _DEFAULT_CPPOPTS + ["-O2"],
# end:google_only
"//conditions:default": _DEFAULT_CPPOPTS,
})
@ -41,8 +41,8 @@ UPB_DEFAULT_COPTS = select({
"//upb:windows": [],
"//upb:fasttable_enabled_setting": ["-std=gnu99", "-DUPB_ENABLE_FASTTABLE"],
# begin:google_only
# # Override default -Oz for release builds on Android.
# "//bazel:android_opt": _DEFAULT_COPTS + ["-O2"],
# # Override default -Oz for release builds on Android.
# "//bazel:android_opt": _DEFAULT_COPTS + ["-O2"],
# end:google_only
"//conditions:default": _DEFAULT_COPTS,
})

@ -14,6 +14,7 @@ load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
def upb_use_cpp_toolchain():
return ["@bazel_tools//tools/cpp:toolchain_type"]
# end:github_only
def cc_library_func(ctx, name, hdrs, srcs, copts, includes, dep_ccinfos):

@ -76,7 +76,6 @@ cc_test(
":benchmark_descriptor_upb_proto",
":benchmark_descriptor_upb_proto_reflection",
"//:protobuf",
"@com_google_googletest//:gtest_main",
"//src/google/protobuf/json",
"//upb:base",
"//upb:descriptor_upb_proto",
@ -88,6 +87,8 @@ cc_test(
"@com_github_google_benchmark//:benchmark_main",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log:absl_check",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)

@ -52,7 +52,7 @@ def junit_tests(name, srcs, data = [], deps = [], package_name = "com.google.pro
if test_prefix:
test_name = "%s%s" % (test_prefix, test_name)
test_names = test_names + [test_name]
suite_name = prefix + '_' + test_name
suite_name = prefix + "_" + test_name
_gen_suite(
name = suite_name,
srcs = [src],

@ -132,10 +132,11 @@ cc_test(
copts = UPB_DEFAULT_CPPOPTS,
deps = [
":protos_internal",
"@com_google_googletest//:gtest_main",
"//upb:mem",
"//protos_generator/tests:test_model_upb_cc_proto",
"//protos_generator/tests:test_model_upb_proto",
"//upb:mem",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -150,6 +151,7 @@ cc_test(
srcs = ["repeated_field_iterator_test.cc"],
deps = [
":repeated_field",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -158,12 +160,13 @@ cc_test(
name = "protos_extension_lock_test",
srcs = ["protos_extension_lock_test.cc"],
deps = [
"@com_google_googletest//:gtest_main",
"//upb:mem",
"//protos",
"//protos:protos_extension_lock",
"//protos_generator/tests:test_model_upb_cc_proto",
"//upb:mem",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/log:absl_check",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)

@ -18,8 +18,8 @@ bzl_library(
srcs = ["upb_cc_proto_library.bzl"],
visibility = ["//visibility:public"],
deps = [
"@bazel_skylib//lib:paths",
"//bazel:upb_proto_library_bzl",
"@bazel_skylib//lib:paths",
"@bazel_tools//tools/cpp:toolchain_utils.bzl",
],
)

@ -22,6 +22,7 @@ load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
def use_cpp_toolchain():
return ["@bazel_tools//tools/cpp:toolchain_type"]
# end:github_only
# Generic support code #########################################################

@ -56,12 +56,12 @@ cc_library(
":names",
":output",
"//:protobuf",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/strings",
"//upb_generator:common",
"//upb_generator:file_layout",
"//upb_generator:keywords",
"//upb_generator:names",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/strings",
],
)

@ -124,12 +124,13 @@ cc_test(
copts = UPB_DEFAULT_CPPOPTS,
deps = [
# begin:google_only
# ":legacy_name_test_proto",
# ":legacy_name_test_proto",
# end:google_only
":no_package_upb_cc_proto",
":test_model_upb_cc_proto",
":test_model_upb_proto",
":naming_conflict_upb_cc_proto",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",

@ -13,6 +13,7 @@ load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
# begin:github_only
load("@rules_pkg//:mappings.bzl", "pkg_files")
load("//python:build_targets.bzl", "build_targets")
build_targets(name = "python")
# end:github_only
@ -20,7 +21,7 @@ licenses(["notice"])
package(
# begin:google_only
# default_applicable_licenses = ["//upb:license"],
# default_applicable_licenses = ["//upb:license"],
# end:google_only
default_visibility = ["//python/dist:__pkg__"],
)
@ -136,10 +137,10 @@ selects.config_setting_group(
# begin:github_only
_message_target_compatible_with = {
"@platforms//os:windows": ["@platforms//:incompatible"],
"@system_python//:none": ["@platforms//:incompatible"],
"@system_python//:unsupported": ["@platforms//:incompatible"],
"//conditions:default": [],
"@platforms//os:windows": ["@platforms//:incompatible"],
"@system_python//:none": ["@platforms//:incompatible"],
"@system_python//:unsupported": ["@platforms//:incompatible"],
"//conditions:default": [],
}
# end:github_only
@ -176,7 +177,7 @@ filegroup(
"unknown_fields.h",
],
# begin:google_only
# compatible_with = ["//buildenv/target:non_prod"],
# compatible_with = ["//buildenv/target:non_prod"],
# end:google_only
)
@ -190,6 +191,7 @@ py_extension(
],
target_compatible_with = select(_message_target_compatible_with),
deps = [
"//third_party/utf8_range",
"//upb:base",
"//upb:descriptor_upb_proto_reflection",
"//upb:eps_copy_input_stream",
@ -203,6 +205,5 @@ py_extension(
"//upb/util:compare",
"//upb/util:def_to_proto",
"//upb/util:required_fields",
"//third_party/utf8_range",
],
)

@ -6,6 +6,7 @@
# https://developers.google.com/open-source/licenses/bsd
load(":pyproto_test_wrapper.bzl", "pyproto_test_wrapper")
# begin:github_only
load("@pip_deps//:requirements.bzl", "requirement")
# end:github_only
@ -39,15 +40,15 @@ py_test(
name = "numpy_test",
srcs = ["numpy_test_wrapper.py"],
main = "numpy_test_wrapper.py",
deps = [
requirement("numpy"),
"//python/google/protobuf/internal/numpy:numpy_test",
"//python:_message",
],
target_compatible_with = select({
"@system_python//:supported": [],
"//conditions:default": ["@platforms//:incompatible"],
"@system_python//:supported": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
requirement("numpy"),
"//python:_message",
"//python/google/protobuf/internal/numpy:numpy_test",
],
)
# end:github_only

@ -2,7 +2,6 @@
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain")
package(
@ -74,8 +73,8 @@ rust_library(
],
rustc_flags = ["--cfg=upb_kernel"],
visibility = [
"//src/google/protobuf:__subpackages__",
"//rust:__subpackages__",
"//src/google/protobuf:__subpackages__",
],
deps = [
":utf8",

@ -7,13 +7,13 @@ cc_library(
srcs = ["cpp_api.cc"],
hdrs = ["cpp_api.h"],
visibility = [
"//src/google/protobuf:__subpackages__",
"//rust:__subpackages__",
"//src/google/protobuf:__subpackages__",
],
deps = [
":rust_alloc_for_cpp_api", # buildcleaner: keep
"@com_google_absl//absl/strings:string_view",
"//:protobuf_nowkt",
"@com_google_absl//absl/strings:string_view",
],
)

@ -7,10 +7,15 @@ load(
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
UNITTEST_PROTO_TARGET = "//src/google/protobuf:test_protos"
UNITTEST_CC_PROTO_TARGET = "//src/google/protobuf:cc_test_protos"
UNITTEST_PROTO3_TARGET = "//src/google/protobuf:test_protos"
UNITTEST_PROTO3_CC_TARGET = "//src/google/protobuf:cc_test_protos"
UNITTEST_PROTO3_OPTIONAL_TARGET = "//src/google/protobuf:test_protos"
UNITTEST_PROTO3_OPTIONAL_CC_TARGET = "//src/google/protobuf:cc_test_protos"
alias(

@ -6,9 +6,9 @@ cc_library(
name = "test_utils",
srcs = ["test_utils.cc"],
deps = [
"@com_google_absl//absl/strings",
"//rust/cpp_kernel:cpp_api",
"//rust/test:unittest_cc_proto",
"@com_google_absl//absl/strings",
],
)
@ -21,8 +21,8 @@ rust_test(
],
deps = [
":test_utils",
"@crate_index//:googletest",
"//rust:protobuf_cpp",
"//rust/test:unittest_cc_rust_proto",
"@crate_index//:googletest",
],
)

@ -23,8 +23,8 @@ rust_library(
"//rust:protobuf_upb": "protobuf",
},
deps = [
"@crate_index//:googletest",
"//rust:protobuf_upb",
"@crate_index//:googletest",
],
)
@ -35,8 +35,8 @@ rust_library(
"//rust:protobuf_cpp": "protobuf",
},
deps = [
"@crate_index//:googletest",
"//rust:protobuf_cpp",
"@crate_index//:googletest",
],
)
@ -48,9 +48,9 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:child_upb_rust_proto",
"//rust/test:parent_upb_rust_proto",
"@crate_index//:googletest",
],
)
@ -62,9 +62,9 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:child_cc_rust_proto",
"//rust/test:parent_cc_rust_proto",
"@crate_index//:googletest",
],
)
@ -76,8 +76,8 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:edition2023_cc_rust_proto",
"@crate_index//:googletest",
],
)
@ -89,8 +89,8 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:edition2023_upb_rust_proto",
"@crate_index//:googletest",
],
)
@ -105,10 +105,10 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust:protobuf_cpp",
"//rust/test:enums_cc_rust_proto",
"//rust/test:unittest_cc_rust_proto",
"@crate_index//:googletest",
],
)
@ -123,10 +123,10 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust:protobuf_upb",
"//rust/test:enums_upb_rust_proto",
"//rust/test:unittest_upb_rust_proto",
"@crate_index//:googletest",
],
)
@ -166,9 +166,9 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:reserved_cc_rust_proto",
"//rust/test:unittest_cc_rust_proto",
"@crate_index//:googletest",
],
)
@ -180,9 +180,9 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:reserved_upb_rust_proto",
"//rust/test:unittest_upb_rust_proto",
"@crate_index//:googletest",
],
)
@ -221,10 +221,10 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust:protobuf_cpp",
"//rust/test:unittest_cc_rust_proto",
"//rust/test/shared:matchers_cpp",
"@crate_index//:googletest",
],
)
@ -243,10 +243,10 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust:protobuf_upb",
"//rust/test:unittest_upb_rust_proto",
"//rust/test/shared:matchers_upb",
"@crate_index//:googletest",
],
)
@ -262,11 +262,11 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust:protobuf_cpp",
"//rust/test:unittest_proto3_cc_rust_proto",
"//rust/test:unittest_proto3_optional_cc_rust_proto",
"//rust/test/shared:matchers_cpp",
"@crate_index//:googletest",
],
)
@ -282,11 +282,11 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust:protobuf_upb",
"//rust/test:unittest_proto3_optional_upb_rust_proto",
"//rust/test:unittest_proto3_upb_rust_proto",
"//rust/test/shared:matchers_upb",
"@crate_index//:googletest",
],
)
@ -298,8 +298,8 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:unittest_upb_rust_proto",
"@crate_index//:googletest",
],
)
@ -311,8 +311,8 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:unittest_cc_rust_proto",
"@crate_index//:googletest",
],
)
@ -324,8 +324,8 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:nested_cc_rust_proto",
"@crate_index//:googletest",
],
)
@ -337,8 +337,8 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:nested_upb_rust_proto",
"@crate_index//:googletest",
],
)
@ -356,9 +356,9 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust:protobuf_cpp",
"//rust/test:unittest_cc_rust_proto",
"@crate_index//:googletest",
],
)
@ -376,9 +376,9 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust:protobuf_upb",
"//rust/test:unittest_upb_rust_proto",
"@crate_index//:googletest",
],
)
@ -393,8 +393,8 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:map_unittest_cc_rust_proto",
"@crate_index//:googletest",
],
)
@ -409,7 +409,7 @@ rust_test(
"not_build:arm",
],
deps = [
"@crate_index//:googletest",
"//rust/test:map_unittest_upb_rust_proto",
"@crate_index//:googletest",
],
)

@ -4,8 +4,8 @@ cc_library(
name = "upb_c_api",
srcs = ["upb_api.c"],
visibility = [
"//src/google/protobuf:__subpackages__",
"//rust:__subpackages__",
"//src/google/protobuf:__subpackages__",
],
deps = [
"//upb:mem",

@ -84,6 +84,7 @@ cc_test(
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -246,6 +247,7 @@ cc_test(
":test_messages_proto3_editions_cc_proto",
"//:protobuf",
"//src/google/protobuf:test_textproto",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -255,6 +257,7 @@ cc_test(
srcs = ["generated_reflection_test.cc"],
deps = [
":test_messages_proto2_editions_cc_proto",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)

@ -59,6 +59,7 @@ cc_test(
":utf8_range",
":utf8_validity",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)

@ -498,16 +498,16 @@ filegroup(
"**/*.c",
"**/*.h",
"**/*.hpp",
],
],
exclude = [
"**/conformance_upb.c",
"reflection/stage0/**/*",
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -47,8 +47,8 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -29,8 +29,8 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -32,10 +32,11 @@ cc_test(
srcs = ["test.cc"],
deps = [
":hash",
"@com_google_googletest//:gtest_main",
"//upb:mem",
"//upb:port",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -49,9 +50,9 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -64,8 +64,9 @@ cc_test(
srcs = ["string_test.cc"],
deps = [
":string",
"@com_google_googletest//:gtest_main",
"//upb:mem",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -78,12 +79,13 @@ cc_test(
":string",
":tokenizer",
":zero_copy_stream",
"@com_google_googletest//:gtest_main",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"//upb:lex",
"//upb:mem",
"//upb:port",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -96,8 +98,9 @@ cc_test(
deps = [
":chunked_stream",
":zero_copy_stream",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)

@ -40,10 +40,11 @@ cc_test(
":struct_upb_proto",
":test_upb_proto",
":test_upb_proto_reflection",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"//upb:reflection",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -55,10 +56,11 @@ cc_test(
":struct_upb_proto",
":test_upb_proto",
":test_upb_proto_reflection",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"//upb:reflection",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -96,7 +98,7 @@ upb_c_proto_library(
# ":json",
# ":test_upb_proto",
# ":test_upb_proto_reflection",
# "@com_google_googletest//:gtest_main",
# "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main",
# "//testing/fuzzing:fuzztest",
# "//upb:base",
# "//upb:mem",
@ -118,6 +120,7 @@ filegroup(
),
visibility = ["//pkg:__pkg__"],
)
filegroup(
name = "test_utils",
srcs = glob(

@ -31,8 +31,9 @@ cc_test(
srcs = ["atoi_test.cc"],
deps = [
":lex",
"@com_google_googletest//:gtest_main",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -46,9 +47,9 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -43,12 +43,13 @@ cc_test(
srcs = ["arena_test.cc"],
deps = [
":mem",
"@com_google_googletest//:gtest_main",
"//upb:port",
"@com_google_absl//absl/random",
"@com_google_absl//absl/random:distributions",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -63,9 +64,9 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -228,7 +228,6 @@ cc_test(
":accessors",
":message",
"//:protobuf",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"//upb:mini_descriptor",
@ -242,6 +241,8 @@ cc_test(
"//upb/test:test_messages_proto3_upb_proto",
"//upb/test:test_upb_proto",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -250,9 +251,10 @@ cc_test(
srcs = ["array_test.cc"],
deps = [
":message",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -264,7 +266,6 @@ cc_test(
":copy",
":message",
"//:protobuf",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"//upb:mini_table",
@ -274,6 +275,8 @@ cc_test(
"//upb/test:test_messages_proto2_upb_proto",
"//upb/test:test_upb_proto",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -282,9 +285,10 @@ cc_test(
srcs = ["map_test.cc"],
deps = [
":message",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -298,7 +302,6 @@ cc_test(
":promote",
":tagged_ptr",
"//:protobuf",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"//upb:mini_descriptor",
@ -310,6 +313,8 @@ cc_test(
"//upb/test:test_proto_upb_minitable",
"//upb/test:test_upb_proto",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -323,7 +328,6 @@ cc_test(
":message_test_upb_proto",
":message_test_upb_proto_reflection",
":value",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:json",
"//upb:mem",
@ -333,6 +337,8 @@ cc_test(
"//upb:wire",
"//upb/test:fuzz_util",
"//upb/test:test_messages_proto3_upb_proto",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -361,10 +367,11 @@ cc_test(
deps = [
":utf8_test_upb_minitable_proto",
":utf8_test_upb_proto",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"//upb:wire",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -378,9 +385,9 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only
@ -394,6 +401,7 @@ filegroup(
),
visibility = ["//pkg:__pkg__"],
)
filegroup(
name = "test_utils",
srcs = glob(

@ -60,7 +60,6 @@ cc_test(
":internal",
":mini_descriptor",
"//:protobuf",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"//upb:message_accessors",
@ -68,6 +67,8 @@ cc_test(
"//upb:port",
"//upb:wire",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -81,9 +82,9 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -82,11 +82,12 @@ cc_test(
name = "compat_test",
srcs = ["compat_test.cc"],
deps = [
"@com_google_googletest//:gtest_main",
"//upb:mini_table_compat",
"//upb/test:test_messages_proto2_upb_minitable",
"//upb/test:test_messages_proto3_upb_minitable",
"//upb/test:test_upb_proto",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -100,9 +101,9 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -45,8 +45,8 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -176,7 +176,6 @@ cc_test(
],
deps = [
":descriptor_upb_proto",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:hash",
"//upb:mem",
@ -184,6 +183,8 @@ cc_test(
"//upb:reflection",
"//upb:reflection_internal",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -223,8 +224,8 @@ filegroup(
exclude = ["stage0/**"],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -179,8 +179,9 @@ cc_test(
deps = [
":proto3_test_upb_proto",
":proto3_test_upb_proto_reflection",
"@com_google_googletest//:gtest_main",
"//upb:reflection",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -191,10 +192,11 @@ cc_test(
deps = [
":editions_test_upb_c_proto",
":editions_test_upb_proto_reflection",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"//upb:reflection",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -207,11 +209,12 @@ cc_test(
":test_cpp_upb_proto_reflection",
":timestamp_upb_proto",
":timestamp_upb_proto_reflection",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:json",
"//upb:port",
"//upb:reflection",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -225,11 +228,12 @@ cc_test(
":test_messages_proto2_upb_proto",
":test_messages_proto3_upb_proto",
":test_upb_proto",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:mem",
"//upb:message",
"//upb:port",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -243,8 +247,9 @@ cc_test(
":proto3_test_upb_proto",
":test_messages_proto2_upb_minitable",
":test_upb_proto",
"@com_google_googletest//:gtest_main",
"//upb:mini_table",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -296,6 +301,7 @@ cc_test(
srcs = ["test_import_empty_srcs.cc"],
deps = [
":test_import_empty_srcs_upb_minitable_proto",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -311,6 +317,7 @@ filegroup(
),
visibility = ["//pkg:__pkg__"],
)
filegroup(
name = "test_utils",
srcs = glob(

@ -38,8 +38,8 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

@ -67,12 +67,13 @@ cc_test(
":def_to_proto_test_upb_proto",
":def_to_proto_test_upb_proto_reflection",
"//:protobuf",
"@com_google_googletest//:gtest_main",
"//upb:descriptor_upb_proto_reflection",
"//upb:mem",
"//upb:reflection",
"//upb/test:parse_text_proto",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -83,7 +84,7 @@ cc_test(
# tags = ["clang_only"],
# deps = [
# ":def_to_proto_test_lib",
# "@com_google_googletest//:gtest_main",
# "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main",
# "//testing/fuzzing:fuzztest",
# ],
# )
@ -130,13 +131,14 @@ cc_test(
":required_fields",
":required_fields_test_upb_proto",
":required_fields_test_upb_proto_reflection",
"@com_google_googletest//:gtest_main",
"//upb:base",
"//upb:json",
"//upb:mem",
"//upb:reflection",
"//upb:reflection_internal",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -161,10 +163,11 @@ cc_test(
srcs = ["compare_test.cc"],
deps = [
":compare",
"@com_google_googletest//:gtest_main",
"//upb:port",
"//upb:wire_reader",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -193,6 +196,7 @@ filegroup(
),
visibility = ["//pkg:__pkg__"],
)
filegroup(
name = "test_utils",
srcs = glob(

@ -26,6 +26,7 @@ cc_library(
deps = [
":eps_copy_input_stream",
":reader",
"//third_party/utf8_range",
"//upb:base",
"//upb:hash",
"//upb:mem",
@ -37,7 +38,6 @@ cc_library(
"//upb:port",
"//upb/mem:internal",
"//upb/mini_table:internal",
"//third_party/utf8_range",
],
)
@ -75,8 +75,9 @@ cc_test(
srcs = ["eps_copy_input_stream_test.cc"],
deps = [
":eps_copy_input_stream",
"@com_google_googletest//:gtest_main",
"//upb:mem",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@ -90,9 +91,9 @@ filegroup(
],
),
visibility = [
"//upb/cmake:__pkg__",
"//python/dist:__pkg__",
]
"//upb/cmake:__pkg__",
],
)
# end:github_only

Loading…
Cancel
Save