Beispiel #1
0
        public void ReadWriteFixedString128()
        {
            var dataStream = new DataStreamWriter(300 * 4, Allocator.Temp);

            var src = new FixedString128("This is a string");

            dataStream.WriteFixedString128(src);

            //Assert.AreEqual(src.LengthInBytes+2, dataStream.Length);

            var reader = new DataStreamReader(dataStream.AsNativeArray());
            var dst    = reader.ReadFixedString128();

            Assert.AreEqual(src, dst);
        }