diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-03-02 20:01:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-03-02 20:01:37 +0000 |
commit | 501699af1603287b1b47ac450fd6eeb826aa76b1 (patch) | |
tree | 3eeb8918d39d675108073c8b76d6dd10586a608c /libgo/go/testing | |
parent | 34c5f21a387dc461042bafc3052ce6e1af786a77 (diff) | |
download | gcc-501699af1603287b1b47ac450fd6eeb826aa76b1.zip gcc-501699af1603287b1b47ac450fd6eeb826aa76b1.tar.gz gcc-501699af1603287b1b47ac450fd6eeb826aa76b1.tar.bz2 |
libgo: Update to weekly.2012-02-22 release.
From-SVN: r184819
Diffstat (limited to 'libgo/go/testing')
-rw-r--r-- | libgo/go/testing/testing.go | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libgo/go/testing/testing.go b/libgo/go/testing/testing.go index d5d60ea..adc8c09 100644 --- a/libgo/go/testing/testing.go +++ b/libgo/go/testing/testing.go @@ -38,16 +38,25 @@ // } // } // -// The package also runs and verifies example code. Example functions -// include an introductory comment that is compared with the standard output -// of the function when the tests are run, as in this example of an example: +// The package also runs and verifies example code. Example functions may +// include a concluding comment that begins with "Output:" and is compared with +// the standard output of the function when the tests are run, as in these +// examples of an example: // -// // hello // func ExampleHello() { // fmt.Println("hello") +// // Output: hello // } // -// Example functions without comments are compiled but not executed. +// func ExampleSalutations() { +// fmt.Println("hello, and") +// fmt.Println("goodbye") +// // Output: +// // hello, and +// // goodbye +// } +// +// Example functions without output comments are compiled but not executed. // // The naming convention to declare examples for a function F, a type T and // method M on type T are: |