diff options
| author | Julian Beltz <MJayBeltz@gmail.com> | 2024-08-08 14:10:35 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-03-03 08:45:36 -0800 |
| commit | fd9b92be517263cf657d15f691d0879127877c1e (patch) | |
| tree | 0e3f20678f4e461ae1873fe8335312ef1fdcdd2e /_content/doc/tutorial | |
| parent | 8b2902f950802f3da01f9eb53daaf15de7639fc0 (diff) | |
| download | go-x-website-fd9b92be517263cf657d15f691d0879127877c1e.tar.xz | |
_content/doc/tutorial: apply the "keep going" principle to "add a test" examples
Fixes golang/go#68741
Change-Id: I287c99df7447a4894d3b9c65fa1ae0932858d32e
GitHub-Last-Rev: ec26e446b9609e6cc7f29663ae670a235980ed14
GitHub-Pull-Request: golang/website#297
Reviewed-on: https://go-review.googlesource.com/c/website/+/603335
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Robert Findley <rfindley@google.com>
Commit-Queue: Sean Liao <sean@liao.dev>
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Diffstat (limited to '_content/doc/tutorial')
| -rw-r--r-- | _content/doc/tutorial/add-a-test.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/_content/doc/tutorial/add-a-test.html b/_content/doc/tutorial/add-a-test.html index 3e6fb186..ea7e5ee0 100644 --- a/_content/doc/tutorial/add-a-test.html +++ b/_content/doc/tutorial/add-a-test.html @@ -49,7 +49,7 @@ func TestHelloName(t *testing.T) { want := regexp.MustCompile(`\b`+name+`\b`) msg, err := Hello("Gladys") if !want.MatchString(msg) || err != nil { - t.Fatalf(`Hello("Gladys") = %q, %v, want match for %#q, nil`, msg, err, want) + t.Errorf(`Hello("Gladys") = %q, %v, want match for %#q, nil`, msg, err, want) } } @@ -58,7 +58,7 @@ func TestHelloName(t *testing.T) { func TestHelloEmpty(t *testing.T) { msg, err := Hello("") if msg != "" || err == nil { - t.Fatalf(`Hello("") = %q, %v, want "", error`, msg, err) + t.Errorf(`Hello("") = %q, %v, want "", error`, msg, err) } } </pre |
