Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2016-10-18 06:25:58 +0300
committerStephen Toub <stoub@microsoft.com>2016-10-18 06:26:42 +0300
commit74cbf6dc1175a74fb00e820462dbeb2366f307b8 (patch)
tree19bc320e8b7207532fd06ae5128f078e8b3b3ed7 /src/System.Drawing.Primitives/tests
parent6dec303efa455f9f20203fba3f1bc7085a1f7cfb (diff)
wip
Diffstat (limited to 'src/System.Drawing.Primitives/tests')
-rw-r--r--src/System.Drawing.Primitives/tests/SerializationTests.cs38
1 files changed, 13 insertions, 25 deletions
diff --git a/src/System.Drawing.Primitives/tests/SerializationTests.cs b/src/System.Drawing.Primitives/tests/SerializationTests.cs
index 7bfd5fbc57..533b7e78d8 100644
--- a/src/System.Drawing.Primitives/tests/SerializationTests.cs
+++ b/src/System.Drawing.Primitives/tests/SerializationTests.cs
@@ -19,45 +19,33 @@ namespace System.Drawing.Primitives.Tests
yield return new object[] { Color.FromName("SomeName") };
}
- public static IEnumerable<object[]> Size_Roundtrip_MemberData()
- {
- yield return new object[] { new SizeF(123.4f, 567.8f) };
- }
-
- public static IEnumerable<object[]> Point_Roundtrip_MemberData()
- {
- yield return new object[] { new PointF(123.4f, 567.8f) };
- }
-
- public static IEnumerable<object[]> Rectangle_Roundtrip_MemberData()
- {
- yield return new object[] { new RectangleF(1.2f, 3.4f, 5.6f, 7.8f) };
- }
-
[Theory]
[MemberData(nameof(Color_Roundtrip_MemberData))]
- public void Color_Roundtrip(Color c) => Assert.Equal(c, BinaryFormatterHelpers.Clone(c));
+ public void Color_Roundtrip(Color c)
+ {
+ Assert.Equal(c, BinaryFormatterHelpers.Clone(c));
+ }
- [Theory]
- [MemberData(nameof(Size_Roundtrip_MemberData))]
- public void Size_Roundtrip(SizeF s)
+ [Fact]
+ public void Size_Roundtrip()
{
+ SizeF s = new SizeF(123.4f, 567.8f);
Assert.Equal(s, BinaryFormatterHelpers.Clone(s));
Assert.Equal(s.ToSize(), BinaryFormatterHelpers.Clone(s.ToSize()));
}
- [Theory]
- [MemberData(nameof(Point_Roundtrip_MemberData))]
- public void Point_Roundtrip(PointF p)
+ [Fact]
+ public void Point_Roundtrip()
{
+ PointF p = new PointF(123.4f, 567.8f);
Assert.Equal(p, BinaryFormatterHelpers.Clone(p));
Assert.Equal(Point.Truncate(p), BinaryFormatterHelpers.Clone(Point.Truncate(p)));
}
- [Theory]
- [MemberData(nameof(Rectangle_Roundtrip_MemberData))]
- public void Rectangle_Roundtrip(RectangleF r)
+ [Fact]
+ public void Rectangle_Roundtrip()
{
+ RectangleF r = new RectangleF(1.2f, 3.4f, 5.6f, 7.8f);
Assert.Equal(r, BinaryFormatterHelpers.Clone(r));
Assert.Equal(Rectangle.Truncate(r), BinaryFormatterHelpers.Clone(Rectangle.Truncate(r)));
}