flatbuffers/tests
tymcauley 9e82ee2527 Fix rust crate for big-endian targets (#5229)
Thanks for tackling this, @tymcauley !

* big endian docker test -- wip

* tweaks

* tweaks

* tweaks

* docker tweaks

* fix conditional compilation issues

* reactivate other docker tests

* try some more cross-platform config (from tymcauley)

* Update tests/docker/languages/Dockerfile.testing.rust.big_endian.1_30_1

Co-Authored-By: rw <rw@users.noreply.github.com>

* Update tests/docker/languages/Dockerfile.testing.rust.big_endian.1_30_1

Co-Authored-By: rw <rw@users.noreply.github.com>

* Update tests/docker/languages/Dockerfile.testing.rust.big_endian.1_30_1

Co-Authored-By: rw <rw@users.noreply.github.com>

* Resolved Rust warnings during big-endian builds.

* Unify Rust test suites for x86 and MIPS builds.

Note that I had to add four extra packages to the MIPS `Dockerfile`:
`libexpat1`, `libmagic1`, `libmpdec2`, and `libreadline7`. For a reason
I couldn't identify, even the simplest Rust MIPS binaries run with
`qemu-mips` would fail with a segfault when run through this
`Dockerfile`. After installing the `gdb-multiarch` package to attempt to
debug the issue, the binaries ran successfully. I pared down the
packages installed by `gdb-multiarch`, and these four packages are the
minimum subset necessary to get Rust MIPS binaries running under
`qemu-mips`.

* Changed Rust tests to use `Vector`s instead of direct-slice-access.

The direct-slice-access method is not available on big-endian targets,
but `flatbuffers::Vector`s provide an array interface that is available
on all platforms.

* Resolved FooStruct endianness issues using explicit struct constructor.

This more closely resembles how FlatBuffers structs are constructed in
generated Rust code.

* Added explanation of how `FooStruct` parallels generated struct code.

Also collected duplicate implementations of `FooStruct` into a common
location.
2019-03-08 01:06:25 -08:00
..
FlatBuffers.Benchmarks Remove byte* property in ByteBufferAllocator (#5191) 2019-02-21 23:36:55 +01:00
FlatBuffers.Test Remove byte* property in ByteBufferAllocator (#5191) 2019-02-21 23:36:55 +01:00
MyGame [Go] Add mutation functions for vector elements (#5221) 2019-03-05 21:16:26 -08:00
docker Fix rust crate for big-endian targets (#5229) 2019-03-08 01:06:25 -08:00
fuzzer Make the Parser independent from the global C-locale (#5028) 2018-11-16 09:24:06 -08:00
include_test Disallowed 0 byte structs. 2018-10-29 17:40:19 -07:00
namespace_test [Fix #5112] flatc generates constructors with memset for non-trivial types (#5222) 2019-03-04 11:10:18 -08:00
prototest Protobufs: Added '--oneof-union' option. (#4647) 2018-03-05 08:45:25 -08:00
rust_usage_test Fix rust crate for big-endian targets (#5229) 2019-03-08 01:06:25 -08:00
union_vector Fixed vector of union JSON parsing. 2019-03-07 15:05:00 -08:00
DartTest.sh Ensure strings are null terminated when written from Dart (#4862) 2018-08-09 09:50:54 -07:00
GoTest.sh [Go] Namespaced imports fix (#5097) 2018-12-27 20:57:19 -05:00
JavaScriptTest.js JS- support clear() method on builder (#5109) 2019-01-14 09:21:42 -08:00
JavaScriptTest.sh Fixed --keep-prefix functionality. 2017-05-24 16:26:57 -07:00
JavaScriptUnionVectorTest.js Vector of unions for TS/JS and PHP (#4404) 2017-08-11 09:24:36 -07:00
JavaTest.bat Fixed vector of unions crash in java (#5190) 2019-02-21 19:50:13 +01:00
JavaTest.java Fixed vector of unions crash in java (#5190) 2019-02-21 19:50:13 +01:00
JavaTest.sh Fixed vector of unions crash in java (#5190) 2019-02-21 19:50:13 +01:00
LuaTest.bat Lua (5.3) Language addition (#4804) 2018-07-05 15:55:57 -07:00
PythonTest.sh Fixed --keep-prefix functionality. 2017-05-24 16:26:57 -07:00
RustTest.bat Rust: test that no heap allocs happen on hot paths (#5022) 2018-10-31 18:08:14 -07:00
RustTest.sh Fix rust crate for big-endian targets (#5229) 2019-03-08 01:06:25 -08:00
TestAll.sh Updated TestAll.sh with Rust. 2018-10-03 12:27:27 -07:00
TypeScriptTest.sh Vector of unions for TS/JS and PHP (#4404) 2017-08-11 09:24:36 -07:00
generate_code.bat Java: Calculation of vtable and vtable size moved to the __init method. (#5210) 2019-02-25 23:45:29 +01:00
generate_code.sh Java: Calculation of vtable and vtable size moved to the __init method. (#5210) 2019-02-25 23:45:29 +01:00
go_test.go [Go] Add mutation functions for vector elements (#5221) 2019-03-05 21:16:26 -08:00
javatest.bin Reduced `force_align` in tests to 8, to work with --object-api. 2019-02-07 14:51:04 -08:00
lobstertest.lobster FlatBuffers implementation for the Lobster programming language 2018-07-29 13:23:00 -07:00
luatest.lua Lua (5.3) Language addition (#4804) 2018-07-05 15:55:57 -07:00
monster_extra.fbs Add default NaN/Inf to C#, Java, Python (#5107) 2019-01-14 09:23:42 -08:00
monster_extra_generated.h Add default NaN/Inf to C#, Java, Python (#5107) 2019-01-14 09:23:42 -08:00
monster_test.bfbs Reduced `force_align` in tests to 8, to work with --object-api. 2019-02-07 14:51:04 -08:00
monster_test.fbs Reduced `force_align` in tests to 8, to work with --object-api. 2019-02-07 14:51:04 -08:00
monster_test.grpc.fb.cc Fix Java generator bug that ignores bidi streaming attribute (#5063) 2018-11-29 10:33:17 -08:00
monster_test.grpc.fb.h Fix Java generator bug that ignores bidi streaming attribute (#5063) 2018-11-29 10:33:17 -08:00
monster_test.schema.json Fixed vectors of enums in object API serialized incorrectly. 2018-11-05 14:33:36 -08:00
monster_test_generated.h [Fix #5112] flatc generates constructors with memset for non-trivial types (#5222) 2019-03-04 11:10:18 -08:00
monster_test_generated.js Changed the JavaScript generation to emit createX helper functions just like the TypeScript code generation. I also added code so that the create methods have documentation in both JavaScript and TypeScript. (#5168) 2019-02-15 01:00:33 +01:00
monster_test_generated.lobster Reduced `force_align` in tests to 8, to work with --object-api. 2019-02-07 14:51:04 -08:00
monster_test_generated.rs [Rust] Fixed codegen documentation for Tables (#5227) 2019-03-06 12:00:58 -08:00
monster_test_generated.ts Reduced `force_align` in tests to 8, to work with --object-api. 2019-02-07 14:51:04 -08:00
monster_test_my_game.example2_generated.dart CI check generate code (#4998) 2018-10-22 15:41:12 -07:00
monster_test_my_game.example_generated.dart Fixed vectors of enums in object API serialized incorrectly. 2018-11-05 14:33:36 -08:00
monster_test_my_game_generated.dart Added missing Dart codegen files. 2018-09-21 09:42:43 -07:00
monsterdata_python_wire.mon Reduced `force_align` in tests to 8, to work with --object-api. 2019-02-07 14:51:04 -08:00
monsterdata_test.golden Go - Use Go bool type for bool fields (#4962) 2018-10-15 16:55:59 -07:00
monsterdata_test.json Go - Use Go bool type for bool fields (#4962) 2018-10-15 16:55:59 -07:00
monsterdata_test.mon Reduced `force_align` in tests to 8, to work with --object-api. 2019-02-07 14:51:04 -08:00
phpTest.php Go - Use Go bool type for bool fields (#4962) 2018-10-15 16:55:59 -07:00
phpUnionVectorTest.php Vector of unions for TS/JS and PHP (#4404) 2017-08-11 09:24:36 -07:00
phpUnionVectorTest.sh Vector of unions for TS/JS and PHP (#4404) 2017-08-11 09:24:36 -07:00
py_test.py Reduced `force_align` in tests to 8, to work with --object-api. 2019-02-07 14:51:04 -08:00
test.cpp Fixed vector of union JSON parsing. 2019-03-07 15:05:00 -08:00
test_assert.cpp Repair MSVC-CRT leakage detector and enable this detection with Appveyor-CI (#5105) 2019-01-24 13:30:11 -08:00
test_assert.h Fixed use of WIN32 needs to be _WIN32. 2019-02-19 10:49:55 -08:00
test_builder.cpp Efficient Conversion of a FlatBufferBuilder to a MessageBuilder (#4980) 2018-10-18 10:32:59 -07:00
test_builder.h Removing 'using namespace' usage in test_builder (#5154) 2019-02-05 02:07:05 +01:00
unicode_test.json Output JSON strings as natural UTF-8 text without escapes (#4710) 2018-05-03 12:10:45 -07:00