]> Sergey Matveev's repositories - btrtrc.git/blobdiff - bencode/decode_test.go
bencode: Remove a lot of expensive allocations
[btrtrc.git] / bencode / decode_test.go
index 133290443f701cea227fa93e217fa6231d69586a..f9876f5adaa7cfc45c5f1037b0c242ab8c44dceb 100644 (file)
@@ -143,7 +143,7 @@ func TestIgnoreUnmarshalTypeError(t *testing.T) {
                Normal int
        }{}
        require.Error(t, Unmarshal([]byte("d6:Normal5:helloe"), &s))
-       assert.Nil(t, Unmarshal([]byte("d6:Ignore5:helloe"), &s))
+       assert.NoError(t, Unmarshal([]byte("d6:Ignore5:helloe"), &s))
        require.Nil(t, Unmarshal([]byte("d6:Ignorei42ee"), &s))
        assert.EqualValues(t, 42, s.Ignore)
 }