mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 21:52:01 +00:00
[C#] add FlatBuffersBuilder.CreateSharedString (#5372)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
79f0df3dfc
commit
51dd733ba4
@@ -135,6 +135,17 @@ namespace FlatBuffers.Test
|
||||
}, builder.DataBuffer.ToFullArray());
|
||||
}
|
||||
|
||||
[FlatBuffersTestMethod]
|
||||
public void TestCreateSharedAsciiString()
|
||||
{
|
||||
var builder = new FlatBufferBuilder(1);
|
||||
builder.CreateSharedString("foo");
|
||||
Assert.ArrayEqual(new byte[] { 3, 0, 0, 0, (byte)'f', (byte)'o', (byte)'o', 0 }, builder.DataBuffer.ToFullArray());
|
||||
|
||||
builder.CreateSharedString("foo");
|
||||
Assert.ArrayEqual(new byte[] { 3, 0, 0, 0, (byte)'f', (byte)'o', (byte)'o', 0 }, builder.DataBuffer.ToFullArray());
|
||||
}
|
||||
|
||||
[FlatBuffersTestMethod]
|
||||
public void TestCreateArbitarytring()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user