Ejemplo n.º 1
0
 public void Type_MakeArrayType()
 {
     Assert.AreEqual(typeof(int[]), Type2.MakeArrayType(typeof(int)));
     Assert.AreEqual(typeof(long[]), Type2.MakeArrayType(typeof(long)));
     Assert.AreEqual(typeof(string[]), Type2.MakeArrayType(typeof(string)));
     Assert.AreEqual(typeof(int[, ]), Type2.MakeArrayType(typeof(int), 2));
     Assert.AreEqual(typeof(int[, , ]), Type2.MakeArrayType(typeof(int), 3));
     Assert.AreEqual(typeof(int[, , , ]), Type2.MakeArrayType(typeof(int), 4));
     Assert.AreEqual(typeof(int[, , , , ]), Type2.MakeArrayType(typeof(int), 5));
     Assert.AreEqual(typeof(long[, ]), Type2.MakeArrayType(typeof(long), 2));
     Assert.AreEqual(typeof(long[, , ]), Type2.MakeArrayType(typeof(long), 3));
     Assert.AreEqual(typeof(long[, , , ]), Type2.MakeArrayType(typeof(long), 4));
     Assert.AreEqual(typeof(long[, , , , ]), Type2.MakeArrayType(typeof(long), 5));
     Assert.AreEqual(typeof(string[, ]), Type2.MakeArrayType(typeof(string), 2));
     Assert.AreEqual(typeof(string[, , ]), Type2.MakeArrayType(typeof(string), 3));
     Assert.AreEqual(typeof(string[, , , ]), Type2.MakeArrayType(typeof(string), 4));
     Assert.AreEqual(typeof(string[, , , , ]), Type2.MakeArrayType(typeof(string), 5));
 }