Changeset 2937 for branches/Persistence Test/HeuristicLab.Persistence
- Timestamp:
- 03/05/10 13:53:54 (15 years ago)
- Location:
- branches/Persistence Test/HeuristicLab.Persistence
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Persistence Test/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj
r1958 r2937 117 117 <Compile Include="Default\CompositeSerializers\Storable\StorableAttribute.cs" /> 118 118 <Compile Include="Default\CompositeSerializers\Storable\StorableSerializer.cs" /> 119 <Compile Include="Default\CompositeSerializers\StructSerializer.cs" /> 119 120 <Compile Include="Default\CompositeSerializers\TypeSerializer.cs" /> 120 121 <Compile Include="Default\DebugString\DebugString.cs" /> -
branches/Persistence Test/HeuristicLab.Persistence/UnitTests/HeuristicLab.Persistence.UnitTest.csproj
r1614 r2937 69 69 <RequiredTargetFramework>3.5</RequiredTargetFramework> 70 70 </Reference> 71 <Reference Include="System.Drawing" /> 71 72 </ItemGroup> 72 73 <ItemGroup> -
branches/Persistence Test/HeuristicLab.Persistence/UnitTests/UseCases.cs
r2858 r2937 17 17 using System.Text.RegularExpressions; 18 18 using HeuristicLab.Persistence.Test; 19 using System.Drawing; 19 20 20 21 namespace HeuristicLab.Persistence.UnitTest { … … 581 582 } 582 583 584 struct TestStruct { 585 int value; 586 int PropertyValue { get; set; } 587 public TestStruct(int value) : this() { 588 this.value = value; 589 PropertyValue = value; 590 } 591 } 592 593 [TestMethod] 594 public void StructTest() { 595 TestStruct s = new TestStruct(10); 596 XmlGenerator.Serialize(s, tempFile); 597 TestStruct newS = (TestStruct)XmlParser.Deserialize(tempFile); 598 Assert.AreEqual(s, newS); 599 } 600 601 [TestMethod] 602 public void PointTest() { 603 Point p = new Point(12, 34); 604 XmlGenerator.Serialize(p, tempFile); 605 Point newP = (Point)XmlParser.Deserialize(tempFile); 606 Assert.AreEqual(p, newP); 607 } 608 609 [TestMethod] 610 public void NullableValueTypes() { 611 double?[] d = new double?[] { null, 1, 2, 3 }; 612 XmlGenerator.Serialize(d, tempFile); 613 double?[] newD = (double?[])XmlParser.Deserialize(tempFile); 614 Assert.AreEqual(d[0], newD[0]); 615 Assert.AreEqual(d[1], newD[1]); 616 Assert.AreEqual(d[2], newD[2]); 617 Assert.AreEqual(d[3], newD[3]); 618 } 619 583 620 [ClassInitialize] 584 621 public static void Initialize(TestContext testContext) {
Note: See TracChangeset
for help on using the changeset viewer.