Skip to content

Commit

Permalink
Add test to very limit on uncompressed data
Browse files Browse the repository at this point in the history
  • Loading branch information
alpe committed Nov 9, 2020
1 parent d4824f3 commit 2efd962
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x/wasm/internal/keeper/ioutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ func TestUncompress(t *testing.T) {
src: []byte{0x1, 0x2},
expResult: []byte{0x1, 0x2},
},
"handle big input slice": {
"handle input slice exceeding limit": {
src: []byte(strings.Repeat("a", maxSize+1)),
expError: types.ErrLimit,
},
"handle input slice at limit": {
src: []byte(strings.Repeat("a", maxSize)),
expResult: []byte(strings.Repeat("a", maxSize)),
},
"handle gzip identifier only": {
src: gzipIdent,
expError: io.ErrUnexpectedEOF,
Expand Down

0 comments on commit 2efd962

Please sign in to comment.