Fix bug in ssz decoding

This commit is contained in:
Paul Hauner
2019-05-11 22:25:28 +10:00
parent 96aeac333a
commit fc2a406edf
2 changed files with 22 additions and 7 deletions

View File

@@ -229,6 +229,18 @@ mod round_trip {
d: Vec<u16>,
}
#[test]
fn three_variable_len() {
let vec: Vec<ThreeVariableLen> = vec![ThreeVariableLen {
a: 42,
b: vec![0],
c: vec![1],
d: vec![2],
}];
round_trip(vec);
}
#[test]
fn offsets_decreasing() {
let bytes = vec![