public static void TestPointerArray() { var ptrArr = new ABT.ArrayType( new ABT.PointerType( new ABT.LongType() ), 3 ); Assert.AreEqual("long *a[3]", ptrArr.Decl("a")); Assert.AreEqual("long *[3]", ptrArr.Decl()); }
public static void TestArrayType() { var type = new ABT.ArrayType( new ABT.LongType(isConst: true), 3 ); Assert.AreEqual("const long a[3]", type.Decl("a")); Assert.AreEqual("const long [3]", type.Decl()); var multiDimArrayType = new ABT.ArrayType( new ABT.ArrayType( new ABT.LongType(isConst: true), 3 ), 4 ); Assert.AreEqual("const long a[4][3]", multiDimArrayType.Decl("a")); Assert.AreEqual("const long [3]", type.Decl()); }