diff --git a/BUILD b/BUILD index 436b845007..65eb95a814 100644 --- a/BUILD +++ b/BUILD @@ -154,6 +154,7 @@ cc_library( deps = [ ":descriptor_upbproto", ":handlers", + ":reflection", ":table", ":upb", ], @@ -236,7 +237,10 @@ cc_library( "tests/upb_test.h", ], copts = CPPOPTS, - deps = [":handlers"], + deps = [ + ":handlers", + ":upb", + ], ) cc_test( @@ -270,7 +274,9 @@ cc_test( srcs = ["tests/pb/test_decoder.cc"], copts = CPPOPTS, deps = [ + ":handlers", ":test_decoder_upbproto", + ":upb", ":upb_pb", ":upb_test", ], @@ -288,6 +294,7 @@ cc_test( deps = [ ":descriptor_upbproto", ":descriptor_upbreflection", + ":upb", ":upb_cc_bindings", ":upb_pb", ":upb_test", @@ -311,6 +318,8 @@ cc_test( srcs = ["tests/test_cpp.cc"], copts = CPPOPTS, deps = [ + ":handlers", + ":reflection", ":test_cpp_upbproto", ":upb", ":upb_pb", @@ -323,6 +332,7 @@ cc_test( srcs = ["tests/test_table.cc"], copts = CPPOPTS, deps = [ + ":table", ":upb", ":upb_test", ], @@ -399,7 +409,7 @@ cc_binary( make_shell_script( name = "gen_test_conformance_upb", out = "test_conformance_upb.sh", - contents = "$(rlocation @com_google_protobuf/conformance_test_runner) $(rlocation upb/conformance_upb)", + contents = "external/com_google_protobuf/conformance_test_runner ./conformance_upb", ) sh_test( diff --git a/WORKSPACE b/WORKSPACE index bcb00f0cca..8a4ef8ec3c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -22,8 +22,10 @@ http_archive( git_repository( name = "com_google_protobuf", - remote = "https://github.com/protocolbuffers/protobuf.git", - commit = "78ca77ac8799f67fda7b9a01cc691cd9fe526f25", + #remote = "https://github.com/protocolbuffers/protobuf.git", + #commit = "78ca77ac8799f67fda7b9a01cc691cd9fe526f25", + remote = "https://github.com/haberman/protobuf.git", + commit = "c659a4a4db2e27463e51c732df25730973956be2", ) http_archive( diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index 782346f7b4..36e550eefc 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -75,21 +75,16 @@ void DoTest( break; } - case conformance_ConformanceRequest_payload_json_payload: { - static const char msg[] = "JSON support not yet implemented."; - conformance_ConformanceResponse_set_skipped( - response, upb_strview_make(msg, sizeof(msg))); - return; - } - case conformance_ConformanceRequest_payload_NOT_SET: fprintf(stderr, "conformance_upb: Request didn't have payload.\n"); return; - default: - fprintf(stderr, "conformance_upb: Unexpected case: %d\n", - conformance_ConformanceRequest_payload_case(request)); - exit(1); + default: { + static const char msg[] = "Unsupported input format."; + conformance_ConformanceResponse_set_skipped( + response, upb_strview_make(msg, sizeof(msg))); + return; + } } switch (conformance_ConformanceRequest_requested_output_format(request)) { @@ -113,17 +108,12 @@ void DoTest( break; } - case conformance_JSON: { - static const char msg[] = "JSON support not yet implemented."; + default: { + static const char msg[] = "Unsupported output format."; conformance_ConformanceResponse_set_skipped( response, upb_strview_make(msg, sizeof(msg))); - break; + return; } - - default: - fprintf(stderr, "conformance_upb: Unknown output format: %d\n", - conformance_ConformanceRequest_requested_output_format(request)); - exit(1); } return; diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 8feb6e28ec..abbafdabc8 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -12,14 +12,13 @@ #include #include "tests/test_cpp.upbdefs.h" +#include "tests/upb_test.h" #include "upb/def.h" #include "upb/handlers.h" #include "upb/pb/decoder.h" #include "upb/pb/textprinter.h" -#include "upb/upb.h" -#include "upb_test.h" - #include "upb/port_def.inc" +#include "upb/upb.h" template void AssertInsert(T* const container, const typename T::value_type& val) {