diff options
| author | Alex Flint <[email protected]> | 2021-04-19 12:49:49 -0700 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2021-04-19 12:49:49 -0700 |
| commit | 23b96d7aacf62828675decc309eae5b9dce5bd51 (patch) | |
| tree | 548c3c3945b4f725aeab4804f940b0cb9659102a /sequence_test.go | |
| parent | 1dfefdc43e8a9a06b532b5c29f876eb38f86a928 (diff) | |
refactor canParse into kindOf
Diffstat (limited to 'sequence_test.go')
| -rw-r--r-- | sequence_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sequence_test.go b/sequence_test.go index 4646811..446bc42 100644 --- a/sequence_test.go +++ b/sequence_test.go @@ -79,3 +79,11 @@ func TestSetMapTextUnmarshaller(t *testing.T) { assert.Equal(t, &textUnmarshaler{2}, m[textUnmarshaler{2}]) assert.Equal(t, &textUnmarshaler{1}, m[textUnmarshaler{3}]) } + +func TestSetMapMalformed(t *testing.T) { + // textUnmarshaler is a struct that captures the length of the string passed to it + var m map[string]string + entries := []string{"missing_equals_sign"} + err := setMap(reflect.ValueOf(&m).Elem(), entries, true) + assert.Error(t, err) +} |
