Changeset 3811 for trunk/sources/HeuristicLab.Persistence/3.3/Tests
- Timestamp:
- 05/14/10 21:23:51 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Tests/UseCases.cs
r3742 r3811 1041 1041 } 1042 1042 } 1043 1044 [TestMethod] 1045 public void TestSpecialNumbers() { 1046 List<double> specials = new List<double>() { 1.0 / 0, -1.0 / 0, 0.0 / 0 }; 1047 Assert.IsTrue(double.IsPositiveInfinity(specials[0])); 1048 Assert.IsTrue(double.IsNegativeInfinity(specials[1])); 1049 Assert.IsTrue(double.IsNaN(specials[2])); 1050 XmlGenerator.Serialize(specials, tempFile); 1051 List<double> newSpecials = XmlParser.Deserialize<List<double>>(tempFile); 1052 Assert.IsTrue(double.IsPositiveInfinity(newSpecials[0])); 1053 Assert.IsTrue(double.IsNegativeInfinity(newSpecials[1])); 1054 Assert.IsTrue(double.IsNaN(newSpecials[2])); 1055 } 1043 1056 1044 1057
Note: See TracChangeset
for help on using the changeset viewer.