6 require rsc.io/quote v1.5.2
8 {"Version":"v1.5.2","Name":"","Short":"","Time":"2018-07-15T16:25:34Z"}
12 require rsc.io/quote v1.5.2
14 // Copyright 2018 The Go Authors. All rights reserved.
15 // Use of this source code is governed by a BSD-style
16 // license that can be found in the LICENSE file.
18 // PACKAGE QUOTE COLLECTS LOUD SAYINGS.
27 // HELLO RETURNS A GREETING.
29 return strings.ToUpper(quote.Hello())
32 // GLASS RETURNS A USEFUL PHRASE FOR WORLD TRAVELERS.
34 return strings.ToUpper(quote.GLASS())
37 // GO RETURNS A GO PROVERB.
39 return strings.ToUpper(quote.GO())
42 // OPT RETURNS AN OPTIMIZATION TRUTH.
44 return strings.ToUpper(quote.OPT())
46 -- QUOTE/quote_test.go --
47 // Copyright 2018 The Go Authors. All rights reserved.
48 // Use of this source code is governed by a BSD-style
49 // license that can be found in the LICENSE file.
59 os.Setenv("LC_ALL", "en")
62 func TestHELLO(t *testing.T) {
63 hello := "HELLO, WORLD"
64 if out := HELLO(); out != hello {
65 t.Errorf("HELLO() = %q, want %q", out, hello)
69 func TestGLASS(t *testing.T) {
70 glass := "I CAN EAT GLASS AND IT DOESN'T HURT ME."
71 if out := GLASS(); out != glass {
72 t.Errorf("GLASS() = %q, want %q", out, glass)
76 func TestGO(t *testing.T) {
77 go1 := "DON'T COMMUNICATE BY SHARING MEMORY, SHARE MEMORY BY COMMUNICATING."
78 if out := GO(); out != go1 {
79 t.Errorf("GO() = %q, want %q", out, go1)
83 func TestOPT(t *testing.T) {
84 opt := "IF A PROGRAM IS TOO SLOW, IT MUST HAVE A LOOP."
85 if out := OPT(); out != opt {
86 t.Errorf("OPT() = %q, want %q", out, opt)