Mono Fix for Unsafe Mode (#4887)

* Added preprocessor define for C++ if Template Aliases are supported by the compiler

* Revert "Revert "Performance Increase of Vector of Structures using .NET BlockCopy (#4830)""

This reverts commit 1f5eae5d6a.

* Put<T> method was inside #if UNSAFE_BYTEBUFFER which caused compilation failure when building in unsafe mode

* Revert "Added preprocessor define for C++ if Template Aliases are supported by the compiler"

This reverts commit a75af73521.
This commit is contained in:
Derek Bailey
2018-08-20 16:31:44 -07:00
committed by Wouter van Oortmerssen
parent 1f5eae5d6a
commit d8f49e18d7
10 changed files with 617 additions and 6 deletions

View File

@@ -221,6 +221,16 @@ namespace FlatBuffers.Test
}
Assert.AreEqual(10, invsum);
// Get the inventory as an array and subtract the
// sum to get it back to 0
var inventoryArray = monster.GetInventoryArray();
Assert.AreEqual(5, inventoryArray.Length);
foreach(var inv in inventoryArray)
{
invsum -= inv;
}
Assert.AreEqual(0, invsum);
var test0 = monster.Test4(0).Value;
var test1 = monster.Test4(1).Value;
Assert.AreEqual(2, monster.Test4Length);