summaryrefslogtreecommitdiff
path: root/tests/test_cpp.cc
AgeCommit message (Collapse)Author
2019-05-14More Blaze fixes.Joshua 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-01-26Fixed tests and code.Josh Haberman
2019-01-26Added missing functions.Josh Haberman
2019-01-25text_printer.h now successfully compiles.Josh Haberman
2019-01-14WIP.Joshua Haberman
2019-01-12All tests pass again!Joshua Haberman
2018-12-17test_cpp is working!Josh Haberman
2017-01-21Make upb::SymbolTable no longer reference-counted.Josh Haberman
This transitions it from shared ownership to unique ownership.
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-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-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-05-08Google-internal development.Josh Haberman
2014-08-30Fix in test_cpp for bad macro expansion.Josh Haberman
2014-08-30Fixed build and added Travis CI support.Josh Haberman
2014-07-29Added UPB_UNTRACKED_REF and some more handler overload options.Josh Haberman
2014-07-02Sync from internal Google 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
2013-12-20Sync from Google-internal development.Josh Haberman
2013-10-24Merge from Google-internal development:Josh Haberman
- rewritten decoder; interpreted decoder is bytecode-based, JIT decoder no longer falls back to the interpreter. - C++ improvements: C++11-compatible iterators, upb::reffed_ptr for RAII refcounting, better upcast/downcast support. - removed the gross upb_value abstraction from public upb.h.
2013-05-11Synced with 3 months of Google-internal development.Josh Haberman
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.
2013-02-15Sync with 8 months of Google-internal development.Josh Haberman
Many things have changed and been simplified. The memory-management story for upb_def and upb_handlers is much more robust; upb_def and upb_handlers should be fairly stable interfaces now. There is still much work to do for the runtime component (upb_sink).
2012-03-31Sync from internal Google development.Joshua Haberman
2012-03-24Sync from internal Google development.Joshua Haberman
Many improvements, too many to mention. One significant perf regression warrants investigation: omitfp.parsetoproto2_googlemessage1.upb_jit: 343 -> 252 (-26.53) plain.parsetoproto2_googlemessage1.upb_jit: 334 -> 251 (-24.85) 25% regression for this benchmark is bad, but since I don't think there's any fundamental design issue that caused it I'm going to go ahead with the commit anyway. Can investigate and fix later. Other benchmarks were neutral or showed slight improvement.
2011-12-22Sync with internal Google development.Joshua Haberman
This breaks the open-source build, will follow up with a change to fix it.
2011-11-23Refinement of upb_bytesrc interface.Joshua Haberman
Added a upb_byteregion that tracks a region of the input buffer; decoders use this instead of using a upb_bytesrc directly. upb_byteregion is also used as the way of passing a string to a upb_handlers callback. This symmetry makes decoders compose better; if you want to take a parsed string and decode it as something else, you can take the string directly from the callback and feed it as input to another parser. A commented-out version of a pinning interface is present; I decline to actually implement it (and accept its extra complexity) until/unless it is clear that it is actually a win. But it is included as a proof-of-concept, to show that it fits well with the existing interface.
2011-11-19Changes to get upb compiling inside Google.Joshua Haberman
2011-09-04Const invasion: large parts of upb made const-correct.Joshua Haberman
2011-09-03Work on C++ wrappers, added C++ test.Joshua Haberman
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback