diff --git a/upb/json/BUILD b/upb/json/BUILD index facb3aa68f..9a2ff40d91 100644 --- a/upb/json/BUILD +++ b/upb/json/BUILD @@ -1,9 +1,6 @@ # TODO(haberman): describe this package. -load( - "//bazel:build_defs.bzl", - "UPB_DEFAULT_COPTS", -) +load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS") load( "//bazel:upb_proto_library.bzl", "upb_proto_library", @@ -27,7 +24,21 @@ cc_library( "//:lex", "//:port", "//:reflection", + "//:wire", + ], +) + +cc_test( + name = "decode_test", + srcs = ["decode_test.cc"], + deps = [ + ":json", + ":struct_upb_proto", + ":test_upb_proto", + ":test_upb_proto_reflection", + "//:reflection", "//:upb", + "@com_google_googletest//:gtest_main", ], ) @@ -36,9 +47,9 @@ cc_test( srcs = ["encode_test.cc"], deps = [ ":json", - ":json_test_upb_proto", - ":json_test_upb_proto_reflection", ":struct_upb_proto", + ":test_upb_proto", + ":test_upb_proto_reflection", "//:reflection", "//:upb", "@com_google_googletest//:gtest_main", @@ -46,39 +57,27 @@ cc_test( ) proto_library( - name = "json_test_proto", + name = "test_proto", testonly = 1, srcs = ["test.proto"], deps = ["@com_google_protobuf//:struct_proto"], ) upb_proto_library( - name = "json_test_upb_proto", + name = "test_upb_proto", testonly = 1, - deps = [":json_test_proto"], + deps = [":test_proto"], ) upb_proto_reflection_library( - name = "json_test_upb_proto_reflection", + name = "test_upb_proto_reflection", testonly = 1, - deps = [":json_test_proto"], -) - -cc_test( - name = "json_decode_test", - srcs = ["decode_test.cc"], - deps = [ - ":json", - ":json_test_upb_proto", - ":json_test_upb_proto_reflection", - ":struct_upb_proto", - "//:reflection", - "//:upb", - "@com_google_googletest//:gtest_main", - ], + deps = [":test_proto"], ) +# TODO: This target arguably belongs in //google/protobuf/BUILD upb_proto_library( name = "struct_upb_proto", + testonly = 1, deps = ["@com_google_protobuf//:struct_proto"], )