summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Collins <dave@davec.name>2015-05-20 15:55:02 -0500
committerDave Collins <dave@davec.name>2015-05-20 15:55:02 -0500
commit7cc554c4aedb5bcb9cd7fa19faeb3db261a317f7 (patch)
tree3f2942a30f6722af73a6199fac0d1c4eb7652470
parent1aa945e8ac07646e0819e5dfa1ccb3548e1f4762 (diff)
downloadgo-xdr-7cc554c4aedb5bcb9cd7fa19faeb3db261a317f7.tar.xz
Correct comment on TestIOErr.
Also, while here, change over the test input to use the error interface instead of the a generic interface.
-rw-r--r--xdr2/error_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/xdr2/error_test.go b/xdr2/error_test.go
index af151cc..ac9c156 100644
--- a/xdr2/error_test.go
+++ b/xdr2/error_test.go
@@ -140,10 +140,11 @@ func TestMarshalError(t *testing.T) {
}
}
-// TestMarshalError tests the error output for the MarshalError type.
+// TestIOErr ensures the IsIO function behaves as expected given different error
+// types.
func TestIOErr(t *testing.T) {
tests := []struct {
- in interface{}
+ in error
want bool
}{
{
@@ -189,7 +190,7 @@ func TestIOErr(t *testing.T) {
}
for i, test := range tests {
- result := IsIO(test.in.(error))
+ result := IsIO(test.in)
if result != test.want {
t.Errorf("Error #%d\n got: %v want: %v", i, result,
test.want)