diff options
author | Josh Haberman <haberman@google.com> | 2013-05-11 16:45:38 -0700 |
---|---|---|
committer | Josh Haberman <haberman@google.com> | 2013-05-11 16:45:38 -0700 |
commit | cfdb9907cb87d15eaab72ceefbfa42fd7a4c3127 (patch) | |
tree | 63f5d70ad64daeeb4ffc777c2c3afd50e2e281b1 /tests/test_cpp.cc | |
parent | 7d3e2bd2c4cfd1296d1d6f996d7548de26540d41 (diff) |
Synced with 3 months of Google-internal development.
Major changes:
- Got rid of all bytestream interfaces in favor of
using regular handlers.
- new Pipeline object represents a upb pipeline, does
bump allocation internally to manage memory.
- proto2 support now can handle extensions.
Diffstat (limited to 'tests/test_cpp.cc')
-rw-r--r-- | tests/test_cpp.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 59603d9..db2337e 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -10,9 +10,10 @@ #include <stdio.h> #include <string.h> #include <iostream> -#include "upb/bytestream.h" #include "upb/def.h" +#include "upb/descriptor/reader.h" #include "upb/handlers.h" +#include "upb/pb/decoder.h" #include "upb/pb/glue.h" #include "upb_test.h" #include "upb/upb.h" @@ -31,16 +32,6 @@ static void TestSymbolTable(const char *descriptor_file) { md->Unref(&md); } -static void TestByteStream() { - upb::StringSource stringsrc; - stringsrc.Reset("testing", 7); - upb::ByteRegion* byteregion = stringsrc.AllBytes(); - ASSERT(byteregion->FetchAll() == UPB_BYTE_OK); - char* str = byteregion->StrDup(); - ASSERT(strcmp(str, "testing") == 0); - free(str); -} - extern "C" { int run_tests(int argc, char *argv[]) { @@ -49,7 +40,6 @@ int run_tests(int argc, char *argv[]) { return 1; } TestSymbolTable(argv[1]); - TestByteStream(); return 0; } |