Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/28/09 12:45:32 (16 years ago)
Author:
epitzer
Message:

Fix StackDecomposer, reverse collection before serialization (#603)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/UnitTests/UseCases.cs

    r1680 r1683  
    7575  public class Root : RootBase {
    7676    [Storable]
     77    public Stack<int> intStack = new Stack<int>();
     78    [Storable]
    7779    public int[] i = new[] { 3, 4, 5, 6 };
    7880    [Storable(Name="Test String")]
     
    150152    public void ComplexStorable() {
    151153      Root r = new Root();
     154      r.intStack.Push(1);
     155      r.intStack.Push(2);
     156      r.intStack.Push(3);
    152157      r.selfReferences = new List<Root> { r, r };
    153158      r.c = new Custom { r = r };
     
    211216      Assert.AreEqual(newR.multiDimArray[1, 1], 4);
    212217      Assert.AreEqual(newR.multiDimArray[1, 2], 6);
     218      Assert.AreEqual(newR.intStack.Pop(), 3);
     219      Assert.AreEqual(newR.intStack.Pop(), 2);
     220      Assert.AreEqual(newR.intStack.Pop(), 1);
    213221      Assert.IsFalse(newR.boolean);
    214222      Assert.IsTrue((DateTime.Now - newR.dateTime).TotalSeconds < 10);
Note: See TracChangeset for help on using the changeset viewer.