summaryrefslogtreecommitdiff
path: root/tests/MyGame/Example
AgeCommit message (Collapse)AuthorFilesLines
2021-05-10C++/Rust version changesWouter van Oortmerssen1-1/+1
2021-05-10C#/Java generated code version updatesWouter van Oortmerssen17-17/+17
2021-05-07[Lua] manipulate byte array as string (#6624)罗泽轩2-0/+18
* [Lua] manipulate byte array as string Sometimes it would be more effective than reading byte by byte * change according to the review * update
2021-04-27[Lua] GetRootAs can accept strings. Made Luatest Benchmarks optional (#6593)Derek Bailey5-0/+15
2021-03-29Rust structz (#6539)Casper7-0/+458
* Rust structz * struct of structs test * swift tmp variables Co-authored-by: Casper Neo <cneo@google.com>
2021-02-23Revert "[C#] Fix truncated ArraySegment<byte> if elementSize != 1 (#6462)" ↵Derek Bailey3-15/+15
(#6488) This reverts commit cbbbaa61b34c31f17773c2fef354c31664e9562e.
2021-02-23[C#] Fix truncated ArraySegment<byte> if elementSize != 1 (#6462)Björn Harrtell3-15/+15
* WIP: Fix returned truncated ArraySegment<byte> if elementSize is not byte * Fix * Regenerated test code
2021-02-19[Go] Working on a go example plus fixing go grpc code (#6448)mustiikhalil1-148/+199
Implemented server.go and half implemented client.go Finishes implementation for greeter go example Update grpc code for monster.fbs Adds a couple of cpp methods Adhere to gofmt standards Adds a readme for issues with grpc
2021-01-28Better python generated code naming (#6336)Richard A Hofer6-220/+554
* Remove a lot of redundancy from the Python generated code. Update tutorial to reflect new Python generated code. * Add aliases for newly deprecated Python generated methods. This should help with backwards compatibility. * Fix incorrect names in deprecated comments.
2021-01-07[C++, JSON] Fix nullptr access when reading a key with a default value. (#6375)Vladimir Glavnyy10-12/+331
This commit fixes handling of default and NULL `key` fields in `Parser::ParseVector` (#5928). The JSON generator updated. It outputs `key` fields even if the `--force-defaults` option is inactive. Additional test cases for `key` added.
2021-01-05Fix generated EndVector. (#6385)Richard A Hofer1-2/+2
2021-01-05Implements type promotion for Java enum (#6382)Stefan de Konink1-3/+3
* Implements type promotion for Java enum as suggested in #3890, #5111, #6369 * After generate_code.sh
2021-01-04Generate code to encode and decode nested flatbuffers in Python. (#6354)Richard A Hofer1-0/+26
* Generate code to encode and decode nested flatbuffers in Python. * Delete accidental trailing whitespace. * Fully delete trailing whitespace.
2020-12-14Add vectorNumElements attribute to Builder for simpler vector creation. (#6328)Richard A Hofer2-21/+21
* Add vectorNumElements attribute to Builder for simpler vector creation. This adds a default to EndVector which should simplify its use. * Update tutorial to reflect new default arg in Python EndVector. * Remove optional argument to Python EndVector. * Add generated files. * Unset Builder.vectorNumElems when not in use.
2020-12-10[Python] Commit some orphan python genfile diffs. (#6325)David P. Sicilia6-6/+6
2020-11-12Union As Accessors for C# (#6251)Derek Bailey1-0/+9
* Union As Accessors for C# * Changed loop to be compatible with older compilers * errant change fix
2020-11-05Added required-nested-flatbuffer to monster_test and fixed rust (#6236)Casper7-12/+266
Co-authored-by: Casper Neo <cneo@google.com>
2020-11-05Support size-prefixed buffers and add tests for size-prefixed messages (#6232)Charlie Yin5-0/+35
2020-10-25Removed C# references from java generator. Move annotations closer to ↵Derek Bailey1-1/+1
definitions (#6204)
2020-09-28[Python/JS/TS] Codegen SizeOf method for structs (#6136)Anass Al5-0/+20
* [Python] Codegen SizeOf classmethod for structs This codegens a `SizeOf()` classmethod for all structs since we can't determine the size of a FlatBuffer generated struct from Python otherwise. * [JS/TS] Codegen sizeOf static method for structs This codegens a `sizeOf()` static method for all structs since we can't determine the size of a FlatBuffer generated struct from JavaScript or TypeScript otherwise.
2020-05-21[C#] Add file identifier to ObjectAPI Serialization Utility. (#5920)mugisoba2-2/+2
* use Finish***Buffer instead. * add file_identifier test.
2020-04-06[C#] Fix nested structs and arrays in Object API (#5765)Anass Al1-2/+4
* [C#] Fix nested structs and arrays in Object API The adds support for nested structs and fixed size arrays in the C# Object API codegen which previously generated invalid code that wouldn't compile. - Nested structs would originally generate syntax errors due to adding an additional `.` to separate fields. - Fixed size arrays of nested structs would originally generate code for the first field in the top most struct, and would lead to a compiler error due to referencing undefined variables. * [C#] fix nested structs and arrays of structs. * fix nested structs + arrays * add table support * Cleanup code Co-authored-by: mugisoba <mugisoba+github@icloud.com>
2020-03-23[csharp] flatc should generate a 'Create…' method for tables with struct ↵stefan3011-50/+151
field… (#5818) * flatc should generate a 'Create…' method for tables with struct fields when also generating the object based api (C#) https://stackoverflow.com/questions/60724317/flatc-should-generate-a-create-method-for-tables-with-struct-fields-when-al * missing namespace fixed: C:\projects\flatbuffers\tests\namespace_test\NamespaceA\TableInFirstNS.cs(30,7): error CS0246: The type or namespace name 'StructInNestedNST' could not be found (are you missing a using directive or an assembly reference?) [C:\projects\flatbuffers\tests\FlatBuffers.Test\FlatBuffers.Test.csproj] Co-authored-by: stefan301 <Stefan.Felkel@de.Zuken.com>
2020-03-12pre-tag version bump for 1.12v1.12.0Wouter van Oortmerssen18-18/+18
Change-Id: I84a9365e9d8a1afe333b1df85058401ffe0a6b7c
2020-03-12Escape characters in jsonschema descriptions (#5644)Marc Butler7-7/+7
* Escape JSON Schema comments * Add quotes to monster comment Thus exercising the JSON Schema comment escape support.
2020-03-05[C#] add ObjectAPI Serialization Utility (#5785)Wouter van Oortmerssen2-0/+16
* [C#] add ObjectAPI Serialization Utility * set InitialBufferSize to 64k * rename SerializeToFlatBuffers to SerializeToBinary
2020-02-10[C#] support Json Serialization (#5752)mugisoba17-0/+280
* support json serialization * fix invalid json format. * string must be written with double quotes. * remove commma after the last object member. * fix indent * Revert "fix invalid json format." This reverts commit d6820ed50c8e3d3cda3aa1849b3079f853608619. * quated string value. * add cs-gen-json-serializer flag. * fix preprocessor indent * ENABLE_JSON_SERIALIZATION -> ENABLE_JSON_SERIALIZATION_TEST * share TestBuffer method * remove ENABLE_JSON_SERIALIZATION * remove duplicated test data * [windows] add nuget restore and copy test data. * [docker mono] share msbuild settings with windows. add nuget restore and copy test data. * add some note for json api.
2020-01-30[C#] support Object API (#5710)mugisoba14-0/+828
* [C#] support Object API * fix sign-compare * fix indent * add new line before for loop. * using auto whenever possible * reduce the amout of blank lines. * wip: support vectors of union * done: support unions of vectors * set C# version to 4.0 * remove null propagation operator * remove auto property initializer * remove expression-bodied method * remove pattern matching * add Example2 to NetTest.sh * separate JavaUsage.md and CsharpUsage.md from JavaCsharpUsage.md * add C# Object based API notes. * support vs2010. * remove range based for loop. * remove System.Linq * fix indent * CreateSharedString to CreateString * check shared attribute * snake case
2020-01-16[Go] Replace references to hardcoded ”Monster" etc with idiomatic go ↵Somo11-42/+42
wherever possible (#5716) * go: replace objAPI-generated Pack func with method See discussion at https://github.com/google/flatbuffers/issues/5668 * go: replace generated union type UnPack func with method Similar to discussion https://github.com/google/flatbuffers/issues/5668 But signature: ``` func AnyUnPack(t Any, table flatbuffers.Table) *AnyT ``` Becomes, ``` func (rcv Any) UnPack(table flatbuffers.Table) *AnyT ```
2020-01-06[Java] Replace Table.UTF8_CHARSET with StandardCharsets.UTF_8 (#5696)dreifachstein2-2/+2
StandardCharsets.UTF_8 is already used in FlexBuffersBuilder.
2019-12-26Optimize Pack method using numpy (#5662)lu-wang-g2-53/+89
Add the support to pack using numpy for scalar vectors when numpy is available.
2019-12-02Flatbuffers Python Object API (#5616)lu-wang-g14-11/+1157
* Flatbuffers Python Object API Implement the logic to generate the Python object API that can unpack the data from a buf class into an object class, and pack the data of an object class to a buf class. * Fix the build issues Remove unused parameters and replace auto in the for-loop statement with std::string to make it compatible with VS2010. * Fix the build issues. * Add support for Array type Added logic to handle Array type in Python Object API. Updated the generated code accordingly. * Fix the old style casting from int to char * Fixed another conversion from int to char * Fixed the import for typing Importing typing may cause errors when a machine do not have the moduel typing installed. This PR fixes the issue by guarding "import typing" with the "try/except" statement. * Fix issue of iterating the vector of import list * Update the generated examples using generate_code.sh * Fix the import order for typing The import list was stored in unordered_set, so that each generated codes may have different import order. Therefore, it failed in the consistency test where two generated copies need to have exactly the same apperance. * Optimize unpack using numpy Use numpy to unpack vector whenever it is possible to improve unpack performance. Also, added codegen command for Python specificly in generate_code.sh, because --no-includes cannot be turn on for Python. * Fix the import order * Update generate_code.bat for windows accordingly * Replace error message with pass Avoid printing error message for every Python2 users about typing. Replace it with pass.
2019-11-26[GO] Fix support for enums with underscores and Unions with imported members ↵Tiago Silva3-90/+90
(#5600) * Fix Enum Stringer method when Enum has underscores Fixes #5481 * Fix go package importing itself when Union has imported members.
2019-11-14Support for python grpc - continuing the work from the pull request #4270 ↵Malar Kannan1-0/+241
#4705 (#5613) * Support for python grpc * add few fixes * Fixes build * Fix python generator * Add tests * Fix grpc python test * Fix tests and add incomplete python generator * Fix python generator * Add python generator methods * Fix Appveyor build * grpc python support v0.1 * Update tests * update grpctest * Remove duplicated code and fix a brace * tests for flatbuffers grpc python * Updated tests + removed SerializeToString, From String * remove pickle import * include missing files in ci - BUILD and generated test result
2019-11-04[C++, Java, C#, TypeScript, JavaScript] Skip generation of mutable union ↵Derek Bailey2-6/+0
types (#5599) * Skip generation of mutable union types * Removed C# and Java unit tests that mutated a Union type
2019-11-04[Kotlin] Fix union vector accessor after change in Java API (#5605)Paulo Pinheiro1-3/+3
Kolin uses java library as dependency, which changed the way it access union vector recently (e365c502ffc659752f9b7a8d60b0052a07e33659). This changes updates kotlin code generation to match Java's changes.
2019-11-04[Go] Add UnPackTo functions (#5598)Lawrence Chan8-18/+50
2019-10-31[Go] Object API support (#5339)iceboy11-3/+739
* start * works for current usages! * unpack: vector of struct * optimize byte slice * support nested struct * support null table * support struct * support union * update generated code * grumble * fix compiler warning * update generated code * wrap type in namespace * bug * wrap in namespace * enum byte arrays * generate struct for unions * basic testing * remove branching * fix assert * pack vector of fixed structs correctly * omit null vectors * Refactor Union Pack and UnPack methods Remove append usage to increase code efficiency when dealing with large vectors * generate goldens
2019-10-28Add ByteBuffer copy for vector of bytes in Java (#5587)Derek Bailey3-5/+11
2019-09-23Java: Added access object for vector of struct and vector of tables. (#5233)Kulikov Alexey12-6/+127
* Java: Added access object for vector of struct and vector of tables. * Java: Workarounds removed when accessing the union vector.
2019-09-10Add element size parameter to __vector_as_arraysegment [c#] (#5512)Kevin Fort3-14/+14
* Add element size parameter to __vector_as_arraysegment Add element size parameter to __vector_as_arraysegment fixing issue where VectorAsBytes returns incorrect size span for multibyte element types. * Update codegen Update codegen and Table to return typed span. * update test files update test files
2019-09-05[Javascript] Fix syntax error for signed enum (#5503)Jaemin Park14-9/+214
* wrap quotes to enum name map to prevent syntax errorn when enum value is negative * Add a test that covers signed enum case
2019-09-03[C#] Fix retrieving enumeration vectors as arrays (#5457)Nathan Williams1-2/+1
* [C#] Fix retrieving enumeration vectors as arrays * [C#] Don't generate CreateVectorBlock for enums
2019-08-23Fix incorrect padding in arrays of structs (Issue #5484) (#5491)svenk1776-27/+75
2019-07-26Python: Added support for file_identifiers (#5123)Joseph Pyott6-0/+24
* Python: Added support for file_identifiers * Added tests. Fixed file_identifier code. * Python: Fixed excessive padding of file_identifier. Repaired tests. * Python: Made code compatible with python2.7 * Python: Typo fix in @endcond * whitespace normaalization * Stylistic change from if(not X is None) to if(X is not None). Added comment to type string. * Python: Added support for automatic code generation of file_identifiers. Added tests for said code generation. * converted sprintf to snprintf * Bugfix, added snprint deffinition for MSVC * changed snprint deffinition for MSVC to sprint_s * changed scanf to IntToStringHex. Renamed HasFileIdentifier to GenHasFileIdentifier. * Added updated genereated code to commit * Python bugix: flatc no longer produces HasFileIdentfier for shcemas with no file identifier * Added tests to verify `MonsterBufferHasIdentifier` returns false on no Identifier * Python: added tests for GetBufferIdentifier and BufferHasIdentifier Python: removed unessasary parenethesis in if statements Minor format changes. * Python : correceted instances of keyword arguments being called as positional arguments * fixed typos and grammer in comments * Minor style fixes * Indentation fix * Equals style changes * Python: Fixed Alignment Issues. Changed test code to test against atual output * Ran make(forgot to run make last commit) * Python: Style changes * Style changes * indentation and style * readded CONTRIBUTING.md * Formatting tweak Mostly to make CI run again * More formatting fixes * More formatting fixes * More formatting fixes * More formatting fixes * Formatting fix * More formatting fixes * Formatting * ran generate_code.sh
2019-07-22Add basic Kotlin support (#5409)Paulo Pinheiro13-0/+1650
* [Kotlin] Add kotlin generate code for tests and add kotlin test to TestAll.sh * [Kotlin] Add Kotlin generator This change adds support for generating Kotlin classes. The approach of this generator is to keep it as close as possible to the java generator for now, in order to keep the change simple. It uses the already implemented java runtime, so we don't support cross-platform nor js Kotlin yet. Kotlin tests are just a copy of the java tests. * Add optional ident support for CodeWriter Identation is important for some languages and different projects have different ways of ident code, e.g. tabs vs spaces, so we are adding optional support on CodeWriter for identation. * [Kotlin] Add Documentation for Kotlin * [Kotlin] Modify generated code to use experimental Unsigned types.
2019-06-20Updated missing generated code for PR #5313 (fixed arrays)Wouter van Oortmerssen6-8/+10
Change-Id: I249140119e6241beb5aec5670d0e5ccddc8f5251
2019-06-18Add support for fixed-size arrays (#5313)svenk17712-0/+378
2019-06-17Add FLATBUFFERS_COMPATIBILITY string (#5381)Vladimir Glavnyy16-26/+36
* Add FLATBUFFERS_COMPATIBILITY string - Add a new __reset method NET/JAVA which hides internal state * Resolve PR notes * Use operator new() to __init of Struct and Table * Restrict visibility of C# Table/Struct to internal level
2019-06-14[C#, Java, C++] Fixes issue #5399 by always including namespaces (#5404)John Luxford10-96/+96
* [C#] Fixes issue #5399 by always including namespaces * Updated tests for code generator changes * Fixed 'As' method names