Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / go.test / test / fixedbugs / bug237.go
blob55cc86acea14eb4bd69694cafeb55294476e398f
1 // $G $D/$F.go && $L $F.$A && ./$A.out
3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 package main
9 import "fmt"
11 var indent uint = 10
12 func main() {
13 const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " +
14 ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "
15 const n = uint(len(dots))
16 i := 2 * indent
17 var s string
18 for ; i > n; i -= n {
19 s += fmt.Sprint(dots)
21 s += dots[0:i]
22 if s != ". . . . . . . . . . " {
23 panic(s)