flatbuffers/tests
Stefan F 65c415911a
Generate nullable properties in C# object-based API for optional scalars. (without -gen-mutable) (#6273)
* Added missing EndTable() call to VerifyObject()

VerifyObject called VerifyTableStart() but not EndTable(). This made Verifier::VerifyComplexity() increase depth_ with each table, not with the depth of tables.

https://groups.google.com/forum/#!topic/flatbuffers/OpxtW5UFAdg

* Added Check to VerifyAlignment

https://stackoverflow.com/questions/59376308/flatbuffers-verifier-returns-false-without-any-assertion-flatbuffers-debug-veri

* Add GetStringView (Convenience function to get string_view from a String returning an empty string_view on null pointer) like GetString, GetCstring

* flatc should warn, when an attribute is attached more than once.

flatc.exe -b duplicate.fbs
warning: duplicate.fbs(5, 36): warning: attribute already found: priority

duplicate.fbs:

namespace MyGame;

attribute "priority";

table Monster (priority:1, priority:2) {
}

root_type Monster;

* flatc should support --binary --schema with optional scalar fields.

This fixes 'error: Optional scalars are not yet supported in at least one the of the specified programming languages.' when calling flatc.exe --binary --schema with a schema containing optional scalars.

* Generate nullable properties in C# object-based API for optional scalars.
tests\generate_code.bat extended to test this.

Ran tests\generate_code.bat
Ran tests\Flatbuffers.Test\NetTest.bat

* %TEST_BASE_FLAGS% replaced with --gen-object-api in generate_code.bat, because only this is part of this PR. Added this same flag to generate_code.sh

* generate_code.bat and generate_code.sh changed to only test c# with object based api.
2020-12-10 16:50:30 -08:00
..
FlatBuffers.Benchmarks
FlatBuffers.Benchmarks.swift [Swift] Adds a format file and reformats the swift project (#6250) 2020-11-16 19:52:38 +03:00
FlatBuffers.GRPC.Swift [Swift] Adds a format file and reformats the swift project (#6250) 2020-11-16 19:52:38 +03:00
FlatBuffers.Test [C#] Optional Scalars (#6217) 2020-10-30 13:18:59 -07:00
FlatBuffers.Test.Swift [Swift] Adds a format file and reformats the swift project (#6250) 2020-11-16 19:52:38 +03:00
MyGame [Python] Commit some orphan python genfile diffs. (#6325) 2020-12-10 16:43:40 -08:00
cpp17 Added required-nested-flatbuffer to monster_test and fixed rust (#6236) 2020-11-05 13:58:06 -08:00
docker [JS/TS] Modernize TypeScript / JavaScript flatbuffers support (#6095) 2020-09-17 12:21:14 -07:00
evolution_test Add Array initialization from struct constructor (#5865) (#6147) 2020-10-12 12:24:18 -07:00
fuzzer [fuzzer] Rename fuzzing dictionaries for `oss-fuzz` (#6318) 2020-12-10 14:02:01 -08:00
include_test Rust Flatbuffers Verifier (#6269) 2020-12-07 18:37:51 -05:00
namespace_test [Python] Commit some orphan python genfile diffs. (#6325) 2020-12-10 16:43:40 -08:00
optional_scalars Generate nullable properties in C# object-based API for optional scalars. (without -gen-mutable) (#6273) 2020-12-10 16:50:30 -08:00
prototest (Optionally) add an additional suffix namespace to generated fbs files. (#5698) 2020-01-06 10:00:59 -08:00
rust_usage_test Rust Flatbuffers Verifier (#6269) 2020-12-07 18:37:51 -05:00
union_vector [C++] Switch `flatc` to `--cpp-std c++11` C++ code generator (#6306) 2020-12-07 11:19:36 -08:00
BUILD Kotlin test optional enum (#6201) 2020-10-22 13:36:02 -07:00
DartTest.sh [Dart] Getting tests/DartTest.sh to work on master. (#5915) 2020-05-15 18:13:29 -07:00
GoTest.sh [Go] Object API support (#5339) 2019-10-31 11:13:45 -07:00
JavaScriptFlexBuffersTest.js [JS] FlexBuffers Fix for wrong type of offset and length values (#6107) 2020-09-10 12:36:37 -07:00
JavaScriptTest.js [Feature] Checks for Nullable strings (#6050) 2020-07-27 09:57:50 -07:00
JavaScriptTest.sh [JS] Add getFullyQualifiedName() (#6119) 2020-09-17 12:19:07 -07:00
JavaScriptUnionVectorTest.js [TS] Add Obj API (#5788) 2020-04-09 09:53:16 -07:00
JavaTest.bat
JavaTest.java [Java] Implement optional scalars (#6212) 2020-10-26 17:46:50 -07:00
JavaTest.sh [Java] Implement optional scalars (#6212) 2020-10-26 17:46:50 -07:00
KotlinTest.kt Kotlin test optional enum (#6201) 2020-10-22 13:36:02 -07:00
KotlinTest.sh [Kotlin] Fix Access to union of vector element (#5994) 2020-06-22 17:08:35 -07:00
LuaTest.bat
LuaTest.sh Fix for Boolean types (#5379) (#5466) 2019-08-01 10:28:54 -07:00
PythonTest.sh Implement flexbuffers in python (#5880) 2020-05-07 14:26:33 -07:00
RustTest.bat Rust Flexbuffers (#5669) 2020-05-07 14:11:26 -07:00
RustTest.sh Rust Flexbuffers (#5669) 2020-05-07 14:11:26 -07:00
TestAll.sh Optional-ness in reflection (#6097) 2020-09-11 14:20:32 -07:00
TypeScriptTest.sh [JS/TS] Modernize TypeScript / JavaScript flatbuffers support (#6095) 2020-09-17 12:21:14 -07:00
arrays_test.bfbs Optional-ness in reflection (#6097) 2020-09-11 14:20:32 -07:00
arrays_test.fbs Fix incorrect padding in arrays of structs (Issue #5484) (#5491) 2019-08-23 10:46:47 -07:00
arrays_test.golden Fix incorrect padding in arrays of structs (Issue #5484) (#5491) 2019-08-23 10:46:47 -07:00
arrays_test.schema.json idl_gen_json_schema.cpp: Changed generation of array element types (#6253) 2020-11-19 16:17:03 -08:00
arrays_test_generated.h [C++] Switch `flatc` to `--cpp-std c++11` C++ code generator (#6306) 2020-12-07 11:19:36 -08:00
generate_code.bat Generate nullable properties in C# object-based API for optional scalars. (without -gen-mutable) (#6273) 2020-12-10 16:50:30 -08:00
generate_code.sh Generate nullable properties in C# object-based API for optional scalars. (without -gen-mutable) (#6273) 2020-12-10 16:50:30 -08:00
go_test.go Support size-prefixed buffers and add tests for size-prefixed messages (#6232) 2020-11-05 11:23:56 -08:00
gold_flexbuffer_example.bin Rust Flexbuffers (#5669) 2020-05-07 14:11:26 -07:00
javatest.bin Fixed warnings generated by recent JSON sorting feature. 2019-10-17 15:16:40 -07:00
lobstertest.lobster Kotlin test optional enum (#6201) 2020-10-22 13:36:02 -07:00
luatest.lua Lua cleanup (#5624) 2019-11-14 15:46:46 -08:00
monster_extra.fbs [Dart] Fix deprecated field support, inf/nan (#5724) 2020-01-23 14:53:58 -08:00
monster_extra_generated.h [C++] Switch `flatc` to `--cpp-std c++11` C++ code generator (#6306) 2020-12-07 11:19:36 -08:00
monster_extra_my_game_generated.dart [Dart] Fix deprecated field support, inf/nan (#5724) 2020-01-23 14:53:58 -08:00
monster_test.bfbs Added required-nested-flatbuffer to monster_test and fixed rust (#6236) 2020-11-05 13:58:06 -08:00
monster_test.fbs Added required-nested-flatbuffer to monster_test and fixed rust (#6236) 2020-11-05 13:58:06 -08:00
monster_test.grpc.fb.cc
monster_test.grpc.fb.h
monster_test.schema.json idl_gen_json_schema.cpp: Changed generation of array element types (#6253) 2020-11-19 16:17:03 -08:00
monster_test_bfbs_generated.h Added required-nested-flatbuffer to monster_test and fixed rust (#6236) 2020-11-05 13:58:06 -08:00
monster_test_generated.h [C++] Switch `flatc` to `--cpp-std c++11` C++ code generator (#6306) 2020-12-07 11:19:36 -08:00
monster_test_generated.js Added required-nested-flatbuffer to monster_test and fixed rust (#6236) 2020-11-05 13:58:06 -08:00
monster_test_generated.lobster Added required-nested-flatbuffer to monster_test and fixed rust (#6236) 2020-11-05 13:58:06 -08:00
monster_test_generated.rs Rust Flatbuffers Verifier (#6269) 2020-12-07 18:37:51 -05:00
monster_test_generated.ts Added required-nested-flatbuffer to monster_test and fixed rust (#6236) 2020-11-05 13:58:06 -08:00
monster_test_grpc.d.ts [TS] GRPC Implementation (#6141) 2020-10-07 09:56:30 -07:00
monster_test_grpc.js [TS] GRPC Implementation (#6141) 2020-10-07 09:56:30 -07:00
monster_test_my_game.example2_generated.dart
monster_test_my_game.example_generated.dart Added required-nested-flatbuffer to monster_test and fixed rust (#6236) 2020-11-05 13:58:06 -08:00
monster_test_my_game_generated.dart
monsterdata_extra.json
monsterdata_python_wire.mon Python: Added support for file_identifiers (#5123) 2019-07-26 11:06:25 -07:00
monsterdata_test.golden
monsterdata_test.json [C#] support Json Serialization (#5752) 2020-02-10 17:43:36 -08:00
monsterdata_test.mon
native_type_test.fbs [C++] remove static_cast expression (#5440) 2019-08-01 14:31:48 -07:00
native_type_test_generated.h [C++] Switch `flatc` to `--cpp-std c++11` C++ code generator (#6306) 2020-12-07 11:19:36 -08:00
native_type_test_impl.cpp [C++] Refactor to conform to Google C++ style guide (#5608) 2019-11-07 12:22:54 -08:00
native_type_test_impl.h [C++] Refactor to conform to Google C++ style guide (#5608) 2019-11-07 12:22:54 -08:00
optional_scalars.fbs Kotlin test optional enum (#6201) 2020-10-22 13:36:02 -07:00
optional_scalars_generated.h [C++] Switch `flatc` to `--cpp-std c++11` C++ code generator (#6306) 2020-12-07 11:19:36 -08:00
optional_scalars_generated.js optional scalars for ts/js (#6215) 2020-10-28 09:45:23 -07:00
optional_scalars_generated.lobster Kotlin test optional enum (#6201) 2020-10-22 13:36:02 -07:00
optional_scalars_generated.rs Rust Flatbuffers Verifier (#6269) 2020-12-07 18:37:51 -05:00
optional_scalars_generated.ts optional scalars for ts/js (#6215) 2020-10-28 09:45:23 -07:00
phpTest.php
phpUnionVectorTest.php
phpUnionVectorTest.sh
py_flexbuffers_test.py Implement flexbuffers in python (#5880) 2020-05-07 14:26:33 -07:00
py_test.py [Python] Fixed issue #5499 (#5764) 2020-02-11 15:02:21 -08:00
test.cpp [C++] Switch `flatc` to `--cpp-std c++11` C++ code generator (#6306) 2020-12-07 11:19:36 -08:00
test_assert.cpp Added --filename-suffix and --filename-ext to flatc (#5778) 2020-03-02 10:15:23 -08:00
test_assert.h wrap multiple statements in do {} while(!IsConstTrue(true)) (#5655) 2019-12-13 10:14:14 -08:00
test_builder.cpp Added --filename-suffix and --filename-ext to flatc (#5778) 2020-03-02 10:15:23 -08:00
test_builder.h Add flatc '--cpp_std' switch (#5656) 2019-12-23 12:13:48 -08:00
unicode_test.json Fixed JSON parser not sorting vectors of tables/structs with key. 2019-10-10 15:25:39 -07:00