示例#1
0
 protected override void AssertArrays(IExtObjectContainer objectContainer, object
                                      obj)
 {
     ShortHandlerUpdateTestCase.ItemArrays itemArrays = (ShortHandlerUpdateTestCase.ItemArrays
                                                         )obj;
     AssertPrimitiveArray(itemArrays._typedPrimitiveArray);
     if (Db4oHeaderVersion() == VersionServices.Header3040)
     {
         // Bug in the oldest format: It accidentally short[] arrays to Short[] arrays.
         AssertWrapperArray((short[])itemArrays._primitiveArrayInObject);
     }
     else
     {
         AssertPrimitiveArray((short[])itemArrays._primitiveArrayInObject);
     }
     AssertWrapperArray(itemArrays._typedWrapperArray);
     AssertWrapperArray((short[])itemArrays._wrapperArrayInObject);
 }
示例#2
0
 protected override object CreateArrays()
 {
     ShortHandlerUpdateTestCase.ItemArrays itemArrays = new ShortHandlerUpdateTestCase.ItemArrays
                                                            ();
     itemArrays._typedPrimitiveArray = new short[data.Length];
     System.Array.Copy(data, 0, itemArrays._typedPrimitiveArray, 0, data.Length);
     short[] dataWrapper = new short[data.Length];
     for (int i = 0; i < data.Length; i++)
     {
         dataWrapper[i] = data[i];
     }
     itemArrays._typedWrapperArray = new short[data.Length + 1];
     System.Array.Copy(dataWrapper, 0, itemArrays._typedWrapperArray, 0, dataWrapper.Length
                       );
     short[] primitiveArray = new short[data.Length];
     System.Array.Copy(data, 0, primitiveArray, 0, data.Length);
     itemArrays._primitiveArrayInObject = primitiveArray;
     short[] wrapperArray = new short[data.Length + 1];
     System.Array.Copy(dataWrapper, 0, wrapperArray, 0, dataWrapper.Length);
     itemArrays._wrapperArrayInObject = wrapperArray;
     return(itemArrays);
 }
		protected override object CreateArrays()
		{
			ShortHandlerUpdateTestCase.ItemArrays itemArrays = new ShortHandlerUpdateTestCase.ItemArrays
				();
			itemArrays._typedPrimitiveArray = new short[data.Length];
			System.Array.Copy(data, 0, itemArrays._typedPrimitiveArray, 0, data.Length);
			short[] dataWrapper = new short[data.Length];
			for (int i = 0; i < data.Length; i++)
			{
				dataWrapper[i] = data[i];
			}
			itemArrays._typedWrapperArray = new short[data.Length + 1];
			System.Array.Copy(dataWrapper, 0, itemArrays._typedWrapperArray, 0, dataWrapper.Length
				);
			short[] primitiveArray = new short[data.Length];
			System.Array.Copy(data, 0, primitiveArray, 0, data.Length);
			itemArrays._primitiveArrayInObject = primitiveArray;
			short[] wrapperArray = new short[data.Length + 1];
			System.Array.Copy(dataWrapper, 0, wrapperArray, 0, dataWrapper.Length);
			itemArrays._wrapperArrayInObject = wrapperArray;
			return itemArrays;
		}