mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 02:42:19 +00:00
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 commit1f5eae5d6a. * 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 commita75af73521.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
1f5eae5d6a
commit
d8f49e18d7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user