示例#1
0
        public void TestB()
        {
            ObjectPacker packer = new ObjectPacker();
            TestB_Class  obj0   = TestB_Class.Create();
            TestB_Class  obj1   = packer.Unpack <TestB_Class> (packer.Pack(obj0));

            obj0.Check(obj1);
        }
示例#2
0
 public void Check(TestB_Class other)
 {
     x.Check(other.x);
     if (nested != null)
     {
         nested.Check(other.nested);
     }
     Assert.AreEqual(list, other.list);
 }
示例#3
0
            static TestB_Class Create(int level)
            {
                TestB_Class obj = new TestB_Class();

                obj.x = new TestA_Class();
                if (level < 10)
                {
                    obj.nested = Create(level + 1);
                }
                if ((level % 2) == 0)
                {
                    obj.list = new int[] { level, 0, level, int.MaxValue, level }
                }
                ;
                return(obj);
            }
示例#4
0
 static TestB_Class Create(int level)
 {
     TestB_Class obj = new TestB_Class ();
     obj.x = new TestA_Class ();
     if (level < 10)
         obj.nested = Create (level + 1);
     if ((level % 2) == 0)
         obj.list = new int[] {level, 0, level, int.MaxValue, level};
     return obj;
 }
示例#5
0
 public void Check(TestB_Class other)
 {
     x.Check (other.x);
     if (nested != null)
         nested.Check (other.nested);
     Assert.AreEqual (list, other.list);
 }