mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-01 17:47:24 +02:00
28 lines
626 B
C#
28 lines
626 B
C#
using NUnit.Framework;
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
using Robust.Shared.Serialization.Markdown.Mapping;
|
|
|
|
namespace Robust.UnitTesting.Shared.Serialization;
|
|
|
|
public sealed class DataStructTest : SerializationTest
|
|
{
|
|
[DataDefinition]
|
|
public struct DefaultIntDataStruct
|
|
{
|
|
public int A = 5;
|
|
|
|
public DefaultIntDataStruct()
|
|
{
|
|
}
|
|
}
|
|
|
|
[Test]
|
|
public void DefaultIntDataStructTest()
|
|
{
|
|
var mapping = new MappingDataNode();
|
|
var val = Serialization.Read<DefaultIntDataStruct>(mapping);
|
|
|
|
Assert.That(val.A, Is.EqualTo(5));
|
|
}
|
|
}
|