diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2019-03-26 10:37:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-26 10:37:37 -0700 |
commit | e999afb61255179d563375e2748a02c036e927e3 (patch) | |
tree | 0278856cbd0263bdddd2f0c68259d3ec2ea383d5 /tests | |
parent | a8a0bc73b981bd94509c180ad8cac36143c479ec (diff) | |
parent | 0abf6083b33b13bea895bf5d885c5ec58b2bd986 (diff) |
Merge pull request #150 from haberman/apitweaks
A few small API tweaks.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conformance_upb.c | 8 | ||||
-rw-r--r-- | tests/pb/test_encoder.cc | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index 0eb1ff8..a0526d7 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -63,8 +63,8 @@ void DoTest( switch (conformance_ConformanceRequest_payload_case(request)) { case conformance_ConformanceRequest_payload_protobuf_payload: { upb_strview payload = conformance_ConformanceRequest_protobuf_payload(request); - test_message = protobuf_test_messages_proto3_TestAllTypesProto3_parsenew( - payload, arena); + test_message = protobuf_test_messages_proto3_TestAllTypesProto3_parse( + payload.data, payload.size, arena); if (!test_message) { static const char msg[] = "Parse error"; @@ -154,8 +154,8 @@ bool DoTestIo() { exit(1); } - request = conformance_ConformanceRequest_parsenew( - upb_strview_make(serialized_input, input_size), arena); + request = + conformance_ConformanceRequest_parse(serialized_input, input_size, arena); response = conformance_ConformanceResponse_new(arena); if (request) { diff --git a/tests/pb/test_encoder.cc b/tests/pb/test_encoder.cc index f0b31c6..aa33370 100644 --- a/tests/pb/test_encoder.cc +++ b/tests/pb/test_encoder.cc @@ -23,8 +23,8 @@ void test_pb_roundtrip() { upb::pb::CodeCache decoder_cache(&encoder_cache); upb::Arena arena; google_protobuf_FileDescriptorSet *set = - google_protobuf_FileDescriptorSet_parsenew( - upb_strview_make(input.c_str(), input.size()), arena.ptr()); + google_protobuf_FileDescriptorSet_parse(input.c_str(), input.size(), + arena.ptr()); ASSERT(set); size_t n; const google_protobuf_FileDescriptorProto *const *files = |