summaryrefslogtreecommitdiff
path: root/tests/pb
AgeCommit message (Collapse)Author
2019-04-17upb_proto_library() aspect is working, even for external repos.Josh Haberman
2019-03-27Moved macros from upb.h to port_def.inc to avoid leaking them to users. (#160)Joshua Haberman
* Use port_def.inc to prevent macros from leaking to users. * Added helpful comments to port_def.inc/port_undef.inc.
2019-03-26Merge branch 'master' into apitweaksJosh Haberman
2019-03-14Merge pull request #151 from linux-on-ibm-z/masterJoshua Haberman
Adding support for big endian platform (s390x)
2019-02-02Update test_varint.cShahid
2019-01-17Merge branch 'arrayapi' into defcleanupJoshua Haberman
2019-01-16Supprot FieldMask json encoding/decoding. (#147)Paul Yang
2019-01-16upb_symtab_add() returns upb_filedef* instead of bool.Joshua Haberman
2019-01-16Removed the JIT. Nobody was actually using it, and table-driven should ↵Joshua Haberman
achieve 80-90% of the perf.
2019-01-15Merge branch 'arrayapi' into defcleanupJoshua Haberman
2019-01-15All tests pass again!Joshua Haberman
2019-01-14WIP.Joshua Haberman
2019-01-12A lot more tests are working now.Joshua Haberman
2019-01-12Removed old-style C++ handlers that relied on UB in favor of more normal ones.Joshua Haberman
2019-01-09upb_refcounted is gone! Some tests still to fix.Joshua Haberman
2018-12-16Got test_decoder working!Joshua Haberman
2018-12-15test_encoder passes! Other tests still need to be fixed.Joshua Haberman
2018-12-13Updated encoder to new API.Joshua Haberman
2018-12-13Ported some tests.Joshua Haberman
2017-03-14Deleted some dead code related to varint decoding.Josh Haberman
2016-11-13Fix glibc coupling in testHATATANI Shinta
2016-08-16WIP.Josh Haberman
2016-05-12Added UPB_ASSERT() that helps avoid unused var warnings.Joshua Haberman
* Added UPB_ASSERT() that helps avoid unused var warnings. * Addressed PR comments. * Fixed assert in the JIT.
2016-04-19Split upb::Arena/upb::Allocator from upb::Environment. (#58)Joshua Haberman
* Split upb::Arena/upb::Allocator from upb::Environment. This will allow arenas and allocators to be used independently of environments, which will be important for an upcoming change (a message representation). Overall this design feels cleaner that the previous Environment/SeededAllocator design. As part of this change, moved all allocations in upb to use a global allocator instead of hard-coding malloc/free. This will allow injecting OOM faults for more robust testing. One place that doesn't use the global allocator is the tracked ref code. Instead of its previous approach of CHECK_OOM() after every malloc() or table insert, it simply uses an allocator that does this automatically. I moved Allocator/Arena/Environment into upb.h. This seems principled since these are the only types in upb whose size is directly exposed to users, since they form the basis of memory allocation strategy. * Cleaned up some header includes and fixed more malloc -> upb_gmalloc(). * Changes from PR review. * Don't use UINTPTR_MAX or UINT64_MAX. * Punt on adding line/file for now. * We actually can't store (uint64_t)-1, update comment and test.
2016-04-06Changes for PR comments.Josh Haberman
2016-04-05Added upb::FileDef, which represents the file defs are declared in.Josh Haberman
It is entirely optional: MessageDef/EnumDef can still exist on their own. But this can represent a def's file when it is desirable to do so (eg. for code generators). This approach will require that we change the way we handle extensions. But I think it will be a good change overall. Specifically, we previously handled extensions by duplicating the extended message and then adding the extension as a regular field to the duplicated message. This required also duplicating any messages that could reach the extended message. In the new world we will need a way of declaring and looking up extensions separately from the message being extended. This change also involves some notable changes to the generated code: - files are now called foo.upbdefs.h instead of foo.upb.h. This reflects the fact that we might possibly generate several different output files for a .proto file, and this one is just for defs. - we no longer generate selectors in the .h file. - the upbdefs.c no longer vends a SymbolTable. Now it vends the individual messages (and possibly a FileDef later). I think this will compose better once we can generate files where one generated files imports another. We also make the descriptor reader vend a list of FileDefs now. This is the best conceptual match for parsing a FileDescriptorSet.
2015-08-19Refer to a shared definition for max buffered bytes.Josh Haberman
2015-08-14Added lots of decoder tests and fixed lots of bugs.Josh Haberman
2015-08-11More decoder fixes, and slightly changed parse call semantics.Josh Haberman
Prior to this change, if an error was returned, it would be guaranteed to always return a short byte count. Now the two concepts are a bit more orthogonal. There are cases where the entire input is consumed even though an error was encountered.
2015-07-31Decoder fix: skipped data at end of submessage.Josh Haberman
2015-07-30Changed parser semantics around skipping.Josh Haberman
Prior to this change: parse(buf, len) -> len + N ...would indicate that the next N bytes of the input are not needed, *and* would advance the decoding position by this much. After this change: parse(buf, len) -> len + N parse(NULL, N) -> N ...can be used to achieve the same thing. But skipping the N bytes is not explicitly performed by the user. A user that doesn't want/need to skip can just say: parsed = parse(buf, len); if (parsed < len) { // Handle suspend, advance stream by "parsed". } else { // Stream was advanced by "len" (even if parsed > len). } Updated unit tests to test this new behavior, and refactored test utility code a bit to support it.
2015-07-07Brought into compliance with Google open-source policies.Josh Haberman
- removed myself from Author headers in source files. - removed copyright notices from source file headers. - added CONTRIBUTING.md
2015-06-22Fixed some bad bugs in upb_env.Josh Haberman
Also added a unit test for upb_encoder that demonstrates the bugs and the fix.
2015-06-02Ported upb to C89, for greater portability.Josh Haberman
A large part of this change contains surface-level porting, like moving variable declarations to the top of the block. However there are a few more substantial things too: - moved internal-only struct definitions to a separate file (structdefs.int.h), for greater encapsulation and ABI compatibility. - removed the UPB_UPCAST macro, since it requires access to the internal-only struct definitions. Replaced uses with calls to inline, type-safe casting functions. - removed the UPB_DEFINE_CLASS/UPB_DEFINE_STRUCT macros. Class and struct definitions are now more explicit -- you get to see the actual class/struct keywords in the source. The casting convenience functions have been moved into UPB_DECLARE_DERIVED_TYPE() and UPB_DECLARE_DERIVED_TYPE2(). - the new way that we duplicate base methods in derived types is also more convenient and requires less duplication. It is also less greppable, but hopefully that is not too big a problem. Compiler flags (-std=c89 -pedantic) should help to rigorously enforce that the code is free of C99-isms. A few functions are not available in C89 (strtoll). There are temporary, hacky solutions in place.
2015-05-08Google-internal development.Josh Haberman
2015-01-07Changes from Google-internal development.Josh Haberman
* JSON parser expanded to handle split buffers. * bugfix to the protobuf decoder.
2014-12-09Decoder bugfix, .gitignore update, and delete obsolete files.Josh Haberman
2014-11-18Sync to Google-internal development.Josh Haberman
2014-07-24Sync from Google-internal development.Josh Haberman
2014-06-26Sync from internal Google development.Josh Haberman
2014-02-04Sync from Google development.Josh Haberman
2014-01-21Sync to internal Google development.Josh Haberman
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback