cmd/gorelease: make TestRelease/errors/errors pass with new error message
In CL 242083, the error message that TestRelease/errors/errors
depended on changed. This means the test passed with Go 1.15 but not
at tip.
This change alters the test module so a different (unchanged) error is
printed.
Fixes golang/go#41146
Change-Id: Id6815e9756a683b61061a19c7ebbf023a6d0d177
Reviewed-on: https://go-review.googlesource.com/c/exp/+/251822
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
diff --git a/cmd/gorelease/testdata/errors/errors.test b/cmd/gorelease/testdata/errors/errors.test
index c5d5711..002a8fc 100644
--- a/cmd/gorelease/testdata/errors/errors.test
+++ b/cmd/gorelease/testdata/errors/errors.test
@@ -8,7 +8,7 @@
example.com/errors/added
------------------------
errors in release version:
- added/added.go:3:15: cannot convert "not an int" (untyped string constant) to int
+ added/added.go:3:15: undeclared name: Missing
Compatible changes:
- package added
@@ -16,7 +16,7 @@
example.com/errors/broken
-------------------------
errors in release version:
- broken/broken.go:3:15: cannot convert "no longer an int" (untyped string constant) to int
+ broken/broken.go:3:15: undeclared name: Missing
Incompatible changes:
- X: value changed from 12 to unknown
@@ -24,7 +24,7 @@
example.com/errors/deleted
--------------------------
errors in base version:
- deleted/deleted.go:3:15: cannot convert "not an int" (untyped string constant) to int
+ deleted/deleted.go:3:15: undeclared name: Missing
Incompatible changes:
- package removed
@@ -32,7 +32,7 @@
example.com/errors/fixed
------------------------
errors in base version:
- fixed/fixed.go:3:15: cannot convert "not an int" (untyped string constant) to int
+ fixed/fixed.go:3:15: undeclared name: Missing
Incompatible changes:
- X: value changed from unknown to 12
diff --git a/cmd/gorelease/testdata/mod/example.com_errors_v0.1.0.txt b/cmd/gorelease/testdata/mod/example.com_errors_v0.1.0.txt
index f049377..3ba57c4 100644
--- a/cmd/gorelease/testdata/mod/example.com_errors_v0.1.0.txt
+++ b/cmd/gorelease/testdata/mod/example.com_errors_v0.1.0.txt
@@ -13,12 +13,12 @@
-- fixed/fixed.go --
package fixed
-const X int = "not an int"
+const X int = Missing
-- deleted/deleted.go --
package deleted
-const X int = "not an int"
+const X int = Missing
-- broken/broken.go --
package broken
diff --git a/cmd/gorelease/testdata/mod/example.com_errors_v0.2.0.txt b/cmd/gorelease/testdata/mod/example.com_errors_v0.2.0.txt
index 1f01c27..668d59b 100644
--- a/cmd/gorelease/testdata/mod/example.com_errors_v0.2.0.txt
+++ b/cmd/gorelease/testdata/mod/example.com_errors_v0.2.0.txt
@@ -10,9 +10,9 @@
-- broken/broken.go --
package broken
-const X int = "no longer an int"
+const X int = Missing
-- added/added.go --
package added
-const X int = "not an int"
+const X int = Missing