mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 19:00:03 +00:00
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:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Google.FlatBuffers.Test
|
||||
{
|
||||
@@ -586,12 +587,14 @@ namespace Google.FlatBuffers.Test
|
||||
[FlatBuffersTestMethod]
|
||||
public void FlatBufferBuilder_Add_ArraySegment_Default_Throws()
|
||||
{
|
||||
var fbb = CreateBuffer(false);
|
||||
#if NETCOREAPP
|
||||
var fbb = CreateBuffer(false);
|
||||
|
||||
// Construct the data array
|
||||
ArraySegment<float> data = default;
|
||||
ArraySegment<float> data = default(ArraySegment<float>);
|
||||
|
||||
Assert.Throws<ArgumentNullException>(() => fbb.Add(data));
|
||||
#endif
|
||||
}
|
||||
|
||||
[FlatBuffersTestMethod]
|
||||
|
||||
Reference in New Issue
Block a user