wire: add error string assertions in tests (google/go-cloud#149)
out.txts that start with "ERROR" can now include substrings to assert exist in the error messages, one per line. This gives a very coarse-grained way of testing for error message quality. It is not a substitute for manual verification, but gives a "good enough" sanity check that relevant details are reported. Updates google/go-cloud#5
This commit is contained in:
1
internal/wire/testdata/Cycle/out.txt
vendored
1
internal/wire/testdata/Cycle/out.txt
vendored
@@ -1 +1,2 @@
|
||||
ERROR
|
||||
cycle
|
||||
|
||||
1
internal/wire/testdata/EmptyVar/out.txt
vendored
1
internal/wire/testdata/EmptyVar/out.txt
vendored
@@ -1 +1,2 @@
|
||||
ERROR
|
||||
not a provider
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
ERROR
|
||||
foo.Foo
|
||||
conflicts with provider
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
ERROR
|
||||
no provider found
|
||||
Fooer
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
ERROR
|
||||
unexported identifier privateMsg
|
||||
|
||||
Reference in New Issue
Block a user