package generator import "testing" func TestType (test *testing.T) { testString (test, `%Index = type i64 %String = type { ptr, %Index } %Pegasus = type { ptr, ptr, ptr, ptr, ptr } %Point = type { i64, i64 } %Rectangle = type { %Point, %Point } %Bool = type i8 %Byte = type i8 %Rune = type i32 %AllInts = type { %Bool, %Byte, %Index, %Rune, i64, i64, i8, i16, i32, i64, i8, i16, i32, i64 } %AllFloats = type { float, double } %Path = type { ptr, %Index } %Quadrangle = type [4 x %Point] %AllTypes = type { %String, %Pegasus, %Rectangle, %AllInts, %AllFloats, %Path, %Quadrangle } declare %AllTypes @x() `, ` Point: (x:Int y:Int) Pegasus: ( [clear clouds:*:Point] [fly rings:*:Point] [fall distance:Int] [complete]:Bool) Rectangle: ( min:Point max:Point) AllInts: ( bool:Bool byte:Byte index:Index rune:Rune word:Int uword:UInt i8:I8 i16:I16 i32:I32 i64:I64 u8:U8 u16:U16 u32:U32 u64:U64) AllFloats: ( f32:F32 f64:F64) Path: *:Point Quadrangle: 4:Point AllTypes: ( string:String pegasus:Pegasus rectangle:Rectangle ints:AllInts floats:AllFloats path:Path quadrangle:Quadrangle ) [x]:AllTypes `) }