flatbuffers/tests/FlatBuffers.Test
Jamie-Jameson c9651b7420
Add overloads for C# ByteBuffer/FlatBufferBuilder to allow adding vector blocks from ArraySegments or IntPtr (#7193)
* Add overloads to Add/Put for ArraySegment and IntPtr

In order to allow using code to reduce memory allocations, add overloads to ByteBuffer's and FlatBuffersBuilder's Put/Add methods that take ArraySegment<T> or IntPtr respectively.
Also, adaptions to the c# code generator in flatc to emit corresponding CreateVectorBlock() overloads

* Add missing files generated with generate_code.py

The previous commit changed the C# code generate, but didn't contain the updated generated test files.

* Incorporate review findings

(1) Adhere to 80 characters limit.
(2) In FlatBufferBuilder.Add(IntPtr,int), move zero length check topmost and add sanity check against negative input
2022-04-01 13:35:07 -07:00
..
Properties Removed BOM marker from some files. 2016-05-23 12:24:44 -07:00
.gitignore [C#] Cleaned up .NET testing script for Mono (#6016) 2020-08-17 13:10:10 -07:00
Assert.cs Removed BOM marker from some files. 2016-05-23 12:24:44 -07:00
ByteBufferTests.cs Add overloads for C# ByteBuffer/FlatBufferBuilder to allow adding vector blocks from ArraySegments or IntPtr (#7193) 2022-04-01 13:35:07 -07:00
FlatBufferBuilderTests.cs Add overloads for C# ByteBuffer/FlatBufferBuilder to allow adding vector blocks from ArraySegments or IntPtr (#7193) 2022-04-01 13:35:07 -07:00
FlatBuffers.Core.Test.csproj Add overloads for C# ByteBuffer/FlatBufferBuilder to allow adding vector blocks from ArraySegments or IntPtr (#7193) 2022-04-01 13:35:07 -07:00
FlatBuffers.Test.csproj Add overloads for C# ByteBuffer/FlatBufferBuilder to allow adding vector blocks from ArraySegments or IntPtr (#7193) 2022-04-01 13:35:07 -07:00
FlatBuffersExampleTests.cs Add .NET test to github workflows (#6982) 2021-12-13 11:51:27 -08:00
FlatBuffersFuzzTests.cs Break internal Java/C# APIs 2019-05-31 13:00:55 -07:00
FlatBuffersTestClassAttribute.cs Removed BOM marker from some files. 2016-05-23 12:24:44 -07:00
FlatBuffersTestMethodAttribute.cs Removed BOM marker from some files. 2016-05-23 12:24:44 -07:00
FuzzTestData.cs Removed BOM marker from some files. 2016-05-23 12:24:44 -07:00
Lcg.cs Added missing licenses to some sh/cs/py files. 2016-05-23 09:51:41 -07:00
NetTest.bat Adds NetTest.bat to run .NET Core tests on Windows (#6216) 2020-10-27 22:51:58 -07:00
NetTest.sh [C#] Use @ for keyword escaping (#6834) 2021-09-09 10:29:27 -07:00
Program.cs Removed BOM marker from some files. 2016-05-23 12:24:44 -07:00
README.md [C#] Cleaned up .NET testing script for Mono (#6016) 2020-08-17 13:10:10 -07:00
TestTable.cs Add FLATBUFFERS_COMPATIBILITY string (#5381) 2019-06-17 19:16:21 +02:00
clean.sh [C#] Cleaned up .NET testing script for Mono (#6016) 2020-08-17 13:10:10 -07:00
packages.config [C#] support Json Serialization (#5752) 2020-02-10 17:43:36 -08:00

README.md

.NET Tests

Running on Linux

Prerequisites

To run the tests on a Linux a few prerequisites are needed:

  1. mono
  2. msbuild

Running

To run the tests:

./NetTest.sh

This will download the .NET installer and core SDK if those are not already installed. Then it will build the tests using msbuild and run the resulting test binary with mono.

After running the tests, the downloaded .NET installer and SDK are not removed as they can be reused in subsequent invocations. The files are ignored by git by default, and can remain in the working directory.

Cleaning

If you want to clean up the downloaded .NET installer and SDK, run:

./clean.sh

This will wipe away the downloaded files and directories. Those will be automatically re-downloaded when running NetTest.sh.