Fix Box2Serializer and tests

This commit is contained in:
ShadowCommander
2021-08-24 22:58:43 -07:00
parent 63c1707581
commit c64fa8f2cc
2 changed files with 5 additions and 5 deletions

View File

@@ -58,10 +58,10 @@ namespace Robust.Shared.Serialization.TypeSerializers.Implementations
ISerializationContext? context = null)
{
var nodeValue =
$"{value.Bottom.ToString(CultureInfo.InvariantCulture)}," +
$"{value.Left.ToString(CultureInfo.InvariantCulture)}," +
$"{value.Top.ToString(CultureInfo.InvariantCulture)}," +
$"{value.Right.ToString(CultureInfo.InvariantCulture)}";
$"{value.Bottom.ToString(CultureInfo.InvariantCulture)}," +
$"{value.Right.ToString(CultureInfo.InvariantCulture)}," +
$"{value.Top.ToString(CultureInfo.InvariantCulture)}";
return new ValueDataNode(nodeValue);
}

View File

@@ -19,7 +19,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers
var bottom = -2;
var right = -3;
var top = 4;
var str = $"{bottom},{left},{top},{right}";
var str = $"{left},{bottom},{right},{top}";
var box = new Box2(left, bottom, right, top);
var node = Serialization.WriteValueAs<ValueDataNode>(box);
@@ -33,7 +33,7 @@ namespace Robust.UnitTesting.Shared.Serialization.TypeSerializers
var bottom = -2;
var right = -3;
var top = 4;
var str = $"{bottom},{left},{top},{right}";
var str = $"{left},{bottom},{right},{top}";
var node = new ValueDataNode(str);
var deserializedBox = Serialization.ReadValueOrThrow<Box2>(node);
var box = new Box2(left, bottom, right, top);