Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/03/09 11:33:59 (15 years ago)
Author:
epitzer
Message:

Generic decomposers for number arrays and number enumerables that "decompose" into a single string. (#563)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence.Test/NewSerializationTest.cs

    r1475 r1494  
    1212
    1313namespace HeuristicLab.Persistence.Test {
     14
     15  public class StringDecomposerTest {
     16    [Storable] private bool _bool = true;
     17    [Storable] private byte _byte = 0xFF;
     18    [Storable] private sbyte _sbyte = 0xF;
     19    [Storable] private short _short = -123;
     20    [Storable] private ushort _ushort = 123;
     21    [Storable] private int _int = -123;
     22    [Storable] private uint _uint = 123;
     23    [Storable] private long _long = 123456;
     24    [Storable] private ulong _ulong = 123456;
     25    [Storable] private long[,] _long_array =
     26      new long[,] { { 123, 456, },  {789, 123 }} ;
     27    [Storable] public List<int> list = new List<int>{ 1, 2, 3, 4, 5};
     28  }
    1429
    1530  public enum TestEnum { va1, va2, va3, va8 } ;
     
    218233    }   
    219234
     235   
     236
     237    public static void Test5() {
     238      StringDecomposerTest sdt = new StringDecomposerTest();     
     239      XmlGenerator.Serialize(sdt, "test5.zip");
     240      object o = XmlParser.DeSerialize("test5.zip");
     241      Console.WriteLine(ViewOnlyGenerator.Serialize(sdt));
     242      Console.WriteLine(ViewOnlyGenerator.Serialize(o));
     243    }
     244
    220245    public class Base {
    221246      [Storable] private int baseInt = 3;     
     
    233258      Test3();
    234259      Test4();
     260      Test5();
    235261      //SpeedTest();
    236262      //SpeedTest2();
Note: See TracChangeset for help on using the changeset viewer.