github.com/bgentry/go@v0.0.0-20150121062915-6cf5a733d54d/src/cmd/go/testdata/example1_test.go (about) 1 // Copyright 2013 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Make sure that go test runs Example_Z before Example_A, preserving source order. 6 7 package p 8 9 import "fmt" 10 11 var n int 12 13 func Example_Z() { 14 n++ 15 fmt.Println(n) 16 // Output: 1 17 } 18 19 func Example_A() { 20 n++ 21 fmt.Println(n) 22 // Output: 2 23 }