summaryrefslogtreecommitdiff
path: root/tests/test.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-08-01Validate UTF-8 by default when parsing IDL. Support Unicode values > U+FFFF ↵Ben Hamilton1-3/+116
in parse
2016-07-20Added way to test two schemas for safe evolution.Wouter van Oortmerssen1-0/+19
Change-Id: I1dfc867e6df5932ab61dad431eb3cb02f15d04df Tested: on Linux. Bug: 30202327
2016-07-21Merge "This is a minimal amount of #ifdef's to make stlport work." into ↵Wouter van Oortmerssen1-1/+3
ub-games-master
2016-07-20Fixed unused parameter warning.Wouter van Oortmerssen1-2/+2
Change-Id: I7a2576c6f366b89ef3e1f83941f90294ca7a07fd
2016-07-20Merge branch 'master' of https://github.com/google/flatbuffers into grpc2Wouter van Oortmerssen1-1/+3
2016-07-20This is a minimal amount of #ifdef's to make stlport work.Wouter van Oortmerssen1-1/+3
Minimal, in the sense that this will only allow flatbuffers.h + generated code to work. Everything else (tests, parsing, reflection etc.) may still not compile with stlport. Functionality has been reduced, some utility functions are not available. Tested: on Linux (no stlport), Android (stlport). Change-Id: I3f8b6a88258c07d78964dd455fb9f99f65266301
2016-07-20Added optional object based API for C++.Wouter van Oortmerssen1-5/+81
Change-Id: If927f3ea3fb3723088fa287f24bdd1ad43c8d1d1 Tested: on Linux.
2016-07-20VS2010 fixesWouter van Oortmerssen1-2/+4
2016-07-14Merge pull request #3905 from bog-dan-ro/masterWouter van Oortmerssen1-0/+18
Verifier computes the buffersize, useful when streaming multiple flatbuffers
2016-07-14Verifier computes the buffersize, useful for streamingBogDan Vatra1-0/+18
Close #3898
2016-07-14Update test.cppRaman1-5/+5
2016-07-14Update test.cppRaman1-1/+1
2016-07-14Update test.cppRaman1-6/+6
2016-07-12Update test.cppRaman1-0/+3
2016-07-09Update test.cppRaman1-1/+1
2016-07-04Update test.cppRaman1-1/+1
2016-06-20JSON Parser allows union type fields to come after unions.Wouter van Oortmerssen1-1/+12
This is useful because many JSON generators will sort the fields, cause X_type to follow X. Change-Id: I00ef3ac05418224fc05aee93e6b3b3597e73ffe3 Tested: on Linux. Bug: 29221752
2016-06-15Added conversion operations that can be used inline in JSON.Wouter van Oortmerssen1-7/+16
e.g.: { myfield: cos(rad(180)) } is equivalent to writing { myfield: -1.0 } Bug: 29338398 Change-Id: I6fc4ef1fd10bda3ba78cba464414dd071a2f50ca Tested: on Linux.
2016-06-15Added additional convenience overloads to CreateVector().Wouter van Oortmerssen1-8/+21
Bug: 29337887, 29336299 Change-Id: Iad8b3b2263f6cea7ee7e45994369194960df293b Tested: on Linux.
2016-06-08Merge branch 'master' of https://github.com/google/flatbuffers into fuzzer2Wouter van Oortmerssen1-0/+40
2016-06-06Added a way to get mutable tables out of a mutable vector of tables.Wouter van Oortmerssen1-0/+9
Change-Id: I8f9ef1d14f86671ced929c7a159115b1d8510327 Tested: on Linux.
2016-05-23Handle \u-escaped surrogate pairs correctly in IDL parserBen Gertzfield1-0/+40
2016-04-29Fix undefined behavior in CheckBitsFit bit-shift on size_tBen Gertzfield1-0/+28
2016-04-11Made user-defined attributes available in the reflection data.Wouter van Oortmerssen1-0/+4
Tested: on Linux. Bug: 27923233 Change-Id: Ic16675650e4a8e138c163f1e2131a3aad7008ada
2016-03-07Merge branch 'master' of https://github.com/google/flatbuffersWouter van Oortmerssen1-0/+3
2016-03-07Added support for easy string pooling.Wouter van Oortmerssen1-7/+13
Change-Id: I790cf681c1bffff800d77afb0e2f908d1c827679 Tested: on Linux. Bug: 26186542
2016-02-22Fix #3775: Skip unknown field names if they're quotedNalinichandra Penke1-0/+3
2016-01-09Fix #3497: Add support for compiling in g++ 4.4 and 4.5Chandra Penke1-13/+22
- Removed uses of lambda expressions - Added custom defines for constexpr and nullptr - Removed trailing comma of last value from generated enums
2015-12-22Fix #2775: Add parser option to skip unknown JSON fieldsNalinichandra Penke1-0/+21
2015-12-21Fixed reflection setting string not changing size field.Wouter van Oortmerssen1-0/+5
Change-Id: I3c3e88a79667d1733b6c47e43b55d8b2604ca8e2 Tested: on Linux.
2015-12-21Added an IsFieldPresent helper function.Wouter van Oortmerssen1-0/+4
This is implemented as a template function, since Table::CheckField is not reachable by subclasses of Table (private base class). Change-Id: I1ed4d47ce7cb672460ccab61cf7442eb9136b0f1 Tested: on Linux. Bug: 26273432
2015-12-14Made sure all namespace test files get generated.Wouter van Oortmerssen1-0/+2
Also included them in the C++ test. Change-Id: Ib0c8470f0aacdf16616c27494abdda57a010195d Tested: on Linux.
2015-12-04Added --gen-all to generate code for a schema and all its includes.Wouter van Oortmerssen1-13/+14
Also refactored the way options are stored. Change-Id: I709ac908cd2aba396c9c282725cf1d42ccce0882 Tested: on Linux.
2015-10-28Allow structs to be parsed in JSON with out of order fields.Wouter van Oortmerssen1-1/+1
Also simplified the code and made it faster. Change-Id: I1d83b1165a4a9a4380d1bfb5538769c012d2d367 Tested: on Linux.
2015-10-28Improved C++ asserts for nesting and not finishing buffers.Wouter van Oortmerssen1-1/+1
Change-Id: I82a392bd262b13e978df748bc54b7ac43aec1e15 Tested: on Linux.
2015-10-13Added support for imports and many other .proto features.Wouter van Oortmerssen1-1/+2
Change-Id: I6600021b7ec8c486794349511232c3e604421c5b Tested: on Linux.
2015-09-16serialize boolean in JSON to "true/false" instead of "0/1"Björn Reimer1-0/+5
Change-Id: I90cf519c00eaf9ccd9fcab8035a91b9205587c3b
2015-08-03Fixed AddFlatBuffer using wrong buffer length.Wouter van Oortmerssen1-2/+2
Also made the Xcode project link. Tested: on OS X.
2015-08-03Reworked reflection.h to be more general.Wouter van Oortmerssen1-1/+1
e.g. support generic reading/writing from structs/vectors etc. Change-Id: I2eb6e24db088a72da444d5c8df7e506e53d5bc2d Tested: on Linux. Bug: 22660837
2015-07-31Added support for adding new tables/strings to an existing FlatBuffer.Wouter van Oortmerssen1-2/+38
As part of the reflection support. Change-Id: Ie0a8e233bca7dffa4cff7e564660035d97ff8902 Tested: on Linux. Bug:22637258
2015-06-29Reflection: generically copy (parts of) FlatBuffers.Wouter van Oortmerssen1-20/+30
Change-Id: Ief3f1507c003079eac90c2bb6c2abd64a80a0a34 Tested: on Linux.
2015-06-15Fixed warnings on WindowsWouter van Oortmerssen1-1/+8
2015-06-15Initial reflection and resizing functionality.Wouter van Oortmerssen1-13/+102
Tested: on Linux. Change-Id: I8f7bccf9b1ad87fea788f85e23fa69435758feca
2015-06-15Make generating dependent include files for C++ the default.Wouter van Oortmerssen1-0/+1
--gen-includes is now deprecate but still accepted. --no-includes can be used instead when needed. Change-Id: I2cd46d193032b9b7c31c76c6f655e9333d3a393a Tested: on Linux.
2015-05-27Added a #define for running tests without file access.Wouter van Oortmerssen1-1/+2
Change-Id: Ib2b7aa8a5641cf73fa0d6f2000db7fdd1aabab66 Tested: on Linux.
2015-05-12Port FlatBuffers to Python.rw1-1/+1
Implement code generation and self-contained runtime library for Python. The test suite verifies: - Correctness of generated Python code by comparing output to that of the other language ports. - The exact bytes in the Builder buffer during many scenarios. - Vtable deduplication correctness. - Edge cases for table construction, via a fuzzer derived from the Go implementation. - All code is simultaneously valid in Python 2.6, 2.7, and 3.4. The test suite includes benchmarks for: - Building 'gold' data. - Parsing 'gold' data. - Deduplicating vtables. All tests pass on this author's system for the following Python implementations: - CPython 2.6.7 - CPython 2.7.8 - CPython 3.4.2 - PyPy 2.5.0 (CPython 2.7.8 compatible)
2015-05-04Added accessor for file_extension in generated code.Wouter van Oortmerssen1-0/+1
Change-Id: I2de7d14dbb1f7b8f81022dd2c9da65060ae49300 Tested: on Linux.
2015-04-29Mutable FlatBuffers: in-place updates.Wouter van Oortmerssen1-1/+37
This commit contains the first step in providing mutable FlatBuffers, non-const accessors and mutation functions for existing fields generated from --gen-mutable. Change-Id: Iebee3975f05c1001f8e22824725edeaa6d85fbee Tested: on Linux. Bug: 15777024
2015-03-11Make FuzzTest2 fuzzier.Max Galkin1-11/+38
1. Random table fields are now marked deprecated. The deprecation rate is adjustable, default is ~10% of fields. 2. Vector type previously produced a dummy field, now a trivial ubyte vector is generated instead. 3. The fuzzed "instances" were previously generated with identical data, now they are randomized: I suppose such was the intent from the beginning, just wasn't implemented. I ran the new test with a few different settings and random seeds (but only on Windows + VS2015), and it always passed. Change-Id: I2014686b6680aec24049ccda3f6deffe5205a83e
2015-03-11Implementation of a buffer release strategy.gregoire-astruc1-11/+14
* Tests for Release feature. * Check vector_downward.buf_ before passing to deallocator. * Assertions. * Shared test between unique_ptr and GetBufferPointer() * Unnecessary using directives. * Reallocate vector if released on clear operation. * Use allocator attribute. * Renamed `Release()` to `ReleaseBufferPointer()` * For consistency with `GetBufferPointer()` * Updated documentation for ReleaseBuffer. Change-Id: I108527778e56ae5127abf9e5b1be6b445ad75cb7