diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2019-05-14 14:12:33 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2019-05-14 14:12:33 -0700 |
commit | 5e5e0cf24aa630d5ee1deb1ebf1032b7b788d9b8 (patch) | |
tree | b0b3aceac5f8930d72cf50edeec09b020c86363b /tests | |
parent | 4451b790bd911743d2d4ee8783fe1bb93c2f4c54 (diff) |
More Blaze fixes.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conformance_upb.c | 28 | ||||
-rw-r--r-- | tests/test_cpp.cc | 5 |
2 files changed, 11 insertions, 22 deletions
diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index 782346f..36e550e 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 8feb6e2..abbafda 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -12,14 +12,13 @@ #include <sstream> #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 <class T> void AssertInsert(T* const container, const typename T::value_type& val) { |