diff options
author | Julien Dessaux | 2021-09-14 17:56:04 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-09-14 17:56:04 +0200 |
commit | 4bacbc23754a63109a2cbe68d272376a3f6847f5 (patch) | |
tree | 101e32c601ca9aabb68cf666299d761d468667a2 /pkg/field/error_test.go | |
parent | Initial import (diff) | |
download | gofunge98-4bacbc23754a63109a2cbe68d272376a3f6847f5.tar.gz gofunge98-4bacbc23754a63109a2cbe68d272376a3f6847f5.tar.bz2 gofunge98-4bacbc23754a63109a2cbe68d272376a3f6847f5.zip |
Began implementing the befunge field data structure
Diffstat (limited to '')
-rw-r--r-- | pkg/field/error_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/field/error_test.go b/pkg/field/error_test.go new file mode 100644 index 0000000..45e8f83 --- /dev/null +++ b/pkg/field/error_test.go @@ -0,0 +1,20 @@ +package field + +import ( + "reflect" + "testing" + + "github.com/stretchr/testify/require" +) + +func requireErrorTypeMatch(t *testing.T, err error, expected error) { + require.Equalf(t, reflect.TypeOf(err), reflect.TypeOf(expected), "Invalid error type. Got %s but expected %s", reflect.TypeOf(err), reflect.TypeOf(expected)) +} + +func TestErrorsCoverage(t *testing.T) { + readErr := ReadError{} + _ = readErr.Error() + _ = readErr.Unwrap() + decodeError := DecodeError{} + _ = decodeError.Error() +} |