]> Cypherpunks.ru repositories - gostls13.git/commitdiff
go/types, types2: replace some Errorf calls with Error calls (cleanup)
authorRobert Griesemer <gri@golang.org>
Fri, 18 Nov 2022 00:09:15 +0000 (16:09 -0800)
committerGopher Robot <gobot@golang.org>
Fri, 18 Nov 2022 00:36:15 +0000 (00:36 +0000)
Change-Id: I9b6759a82b8009b323132c78cb7d78c2c35652bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/451815
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/types2/issues_test.go
src/go/types/issues_test.go

index c45c536e910553069dbbc0a7cafa75328cb048d3..1fda04b9c55751c31f17ab6749f67f2ed593bea0 100644 (file)
@@ -593,24 +593,24 @@ func TestIssue50646(t *testing.T) {
        comparableType := Universe.Lookup("comparable").Type()
 
        if !Comparable(anyType) {
-               t.Errorf("any is not a comparable type")
+               t.Error("any is not a comparable type")
        }
        if !Comparable(comparableType) {
-               t.Errorf("comparable is not a comparable type")
+               t.Error("comparable is not a comparable type")
        }
 
        if Implements(anyType, comparableType.Underlying().(*Interface)) {
-               t.Errorf("any implements comparable")
+               t.Error("any implements comparable")
        }
        if !Implements(comparableType, anyType.(*Interface)) {
-               t.Errorf("comparable does not implement any")
+               t.Error("comparable does not implement any")
        }
 
        if AssignableTo(anyType, comparableType) {
-               t.Errorf("any assignable to comparable")
+               t.Error("any assignable to comparable")
        }
        if !AssignableTo(comparableType, anyType) {
-               t.Errorf("comparable not assignable to any")
+               t.Error("comparable not assignable to any")
        }
 }
 
index 5cee7a055e1f2b91757236d73fce00f2e7931bba..02ec67ff84e3077af492a2bf47bc9952cb7f2f46 100644 (file)
@@ -619,24 +619,24 @@ func TestIssue50646(t *testing.T) {
        comparableType := Universe.Lookup("comparable").Type()
 
        if !Comparable(anyType) {
-               t.Errorf("any is not a comparable type")
+               t.Error("any is not a comparable type")
        }
        if !Comparable(comparableType) {
-               t.Errorf("comparable is not a comparable type")
+               t.Error("comparable is not a comparable type")
        }
 
        if Implements(anyType, comparableType.Underlying().(*Interface)) {
-               t.Errorf("any implements comparable")
+               t.Error("any implements comparable")
        }
        if !Implements(comparableType, anyType.(*Interface)) {
-               t.Errorf("comparable does not implement any")
+               t.Error("comparable does not implement any")
        }
 
        if AssignableTo(anyType, comparableType) {
-               t.Errorf("any assignable to comparable")
+               t.Error("any assignable to comparable")
        }
        if !AssignableTo(comparableType, anyType) {
-               t.Errorf("comparable not assignable to any")
+               t.Error("comparable not assignable to any")
        }
 }