Fix verification for C# unions (#7970)

* Fix verification for unions

* Run scripts\generate_code.py

---------

Co-authored-by: Michael Le <michael.le647@gmail.com>
This commit is contained in:
Curt Hagenlocher
2023-09-30 18:54:48 -07:00
committed by GitHub
parent 1fdb5d263a
commit f4e23bf91e
13 changed files with 248 additions and 217 deletions

View File

@@ -422,7 +422,7 @@ namespace Google.FlatBuffers.Test
// Get the full array back out and ensure they are equivalent
var bbArray = uut.ToArray<T>(nOffset, data.Count);
Assert.ArrayEqual(data.ToArray(), bbArray);
Assert.ArrayEqual(data, bbArray);
}
public unsafe void ByteBuffer_Put_IntPtr_Helper<T>(T[] data, int typeSize)
@@ -643,7 +643,7 @@ namespace Google.FlatBuffers.Test
float[] data = null;
Assert.Throws<ArgumentNullException>(() => uut.Put(1024, data));
ArraySegment<float> dataArraySegment = default;
ArraySegment<float> dataArraySegment = default(ArraySegment<float>);
Assert.Throws<ArgumentNullException>(() => uut.Put(1024, dataArraySegment));
IntPtr dataPtr = IntPtr.Zero;