mirror of
https://github.com/google/flatbuffers.git
synced 2026-11-13 07:26:23 +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:
co-authored by
Michael Le
parent
1fdb5d263a
commit
f4e23bf91e
@@ -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