1# Tests specific to cpp kernel. 2# 3# Only add tests that are cpp kernel specific and it is not possible to make them work for upb ( 4# for example tests exercising ABI compatibility with C++ Protobuf API). 5# 6# All the tests under this package should ignore 7# `//rust:rust_proto_library_kernel` flag and should always select `cpp`. 8# 9# To do that use: 10# * `rust_cc_proto_library` instead of `rust_proto_library`. 11# * `//rust:protobuf_cpp_export` instead of 12# `//rust:protobuf`. 13 14load("@rules_rust//rust:defs.bzl", "rust_test") 15load( 16 "//rust:defs.bzl", 17 "rust_cc_proto_library", 18) 19 20proto_library( 21 name = "debug_proto", 22 testonly = True, 23 srcs = ["debug.proto"], 24) 25 26rust_cc_proto_library( 27 name = "debug_cpp_rust_proto", 28 testonly = True, 29 deps = [":debug_proto"], 30) 31 32proto_library( 33 name = "optimize_for_lite_proto", 34 testonly = True, 35 srcs = ["optimize_for_lite.proto"], 36) 37 38rust_cc_proto_library( 39 name = "optimize_for_lite_cpp_rust_proto", 40 testonly = True, 41 visibility = [ 42 "//rust/test/shared:__subpackages__", 43 ], 44 deps = [":optimize_for_lite_proto"], 45) 46 47rust_test( 48 name = "debug_test", 49 srcs = ["debug_test.rs"], 50 deps = [ 51 ":debug_cpp_rust_proto", 52 ":optimize_for_lite_cpp_rust_proto", 53 "//rust:protobuf_cpp_export", 54 "@crate_index//:googletest", 55 ], 56) 57