1 //===- string_test.go - test Stringer implementation for Type -------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file tests the Stringer interface for the Type type.
12 //===----------------------------------------------------------------------===//
20 func TestStringRecursiveType(t *testing.T) {
23 s := ctx.StructCreateNamed("recursive")
24 s.StructSetBody([]Type{s, s}, false)
25 if str := s.String(); str != "%recursive: StructType(%recursive, %recursive)" {
26 t.Errorf("incorrect string result %q", str)