]> Cypherpunks repositories - gostls13.git/commitdiff
html/template, encoding/asn1: fix test errors
authorDominik Honnef <dominik@honnef.co>
Wed, 28 Oct 2015 07:10:46 +0000 (08:10 +0100)
committerAndrew Gerrand <adg@golang.org>
Tue, 10 Nov 2015 00:30:41 +0000 (00:30 +0000)
Change-Id: I1da1d718609eb6a7b78d29b173ec780bde22c687
Reviewed-on: https://go-review.googlesource.com/16422
Reviewed-by: Ralph Corderoy <ralph@inputplus.co.uk>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/encoding/asn1/asn1_test.go
src/html/template/clone_test.go

index 3be4de9c8ee13f20708c0f7a21b5cff44299d773..fbae7d9f085065409921a06beb911a6314411bd5 100644 (file)
@@ -948,7 +948,7 @@ func TestMarshalNilValue(t *testing.T) {
        }
        for i, test := range nilValueTestData {
                if _, err := Marshal(test); err == nil {
-                       t.Fatal("#%d: successfully marshaled nil value", i)
+                       t.Fatalf("#%d: successfully marshaled nil value", i)
                }
        }
 }
index a0f1d6a04841c3c44025cd9fd4fb60d16474a684..d7c62fa3993b042fcc53ed7e03f1f5be5f769695 100644 (file)
@@ -81,7 +81,7 @@ func TestClone(t *testing.T) {
        // Clone t0 as t4. Redefining the "lhs" template should not fail.
        t4 := Must(t0.Clone())
        if _, err := t4.Parse(`{{define "lhs"}} OK {{end}}`); err != nil {
-               t.Error(`redefine "lhs": got err %v want non-nil`, err)
+               t.Errorf(`redefine "lhs": got err %v want nil`, err)
        }
        // Cloning t1 should fail as it has been executed.
        if _, err := t1.Clone(); err == nil {