- Timestamp:
- 05/04/17 20:17:51 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCasesPersistenceNew.cs
r14928 r14932 30 30 using System.Reflection; 31 31 using System.Text; 32 using System.Threading; 32 33 using System.Threading.Tasks; 33 34 using HeuristicLab.Algorithms.GeneticAlgorithm; … … 2335 2336 }); 2336 2337 ProtoBufSerializer serializer = new ProtoBufSerializer(); 2337 serializer.Serialize(test(), tempFile); 2338 object o = serializer.Deserialize(tempFile); 2338 GeneticAlgorithm original = test(); 2339 serializer.Serialize(original, tempFile); 2340 object o = serializer.Deserialize(tempFile); 2341 2342 // this fails because old persistence didn't handle all IComparer ? 2343 // Assert.AreEqual(DebugStringGenerator.Serialize(original),DebugStringGenerator.Serialize(o)); 2344 2339 2345 GeneticAlgorithm result = (GeneticAlgorithm)o; 2340 2346 SamplesUtils.RunAlgorithm(result); 2341 GeneticAlgorithm original = test();2342 2347 SamplesUtils.RunAlgorithm(original); 2343 //Assert.AreEqual(original.Results[""], result); 2344 2345 //string msg = Profile(test); 2346 //Console.WriteLine(msg); 2347 } 2348 Assert.AreEqual(((DoubleValue)result.Results["BestQuality"].Value).Value, 2349 ((DoubleValue)original.Results["BestQuality"].Value).Value); 2350 2351 // Assert.AreEqual(DebugStringGenerator.Serialize(result), DebugStringGenerator.Serialize(result2)); 2352 } 2353 2348 2354 [TestMethod] 2349 2355 [TestCategory("Persistence4")]
Note: See TracChangeset
for help on using the changeset viewer.