Remove commented-out function

This commit is contained in:
Paul Hauner 2018-09-13 13:06:41 +10:00
parent 88f9295e10
commit 16bc6ba82a

View File

@ -114,53 +114,4 @@ mod tests {
fn test_encode_length_4_bytes_panic() { fn test_encode_length_4_bytes_panic() {
encode_length(16777216, LENGTH_BYTES); // 2^(3*8) encode_length(16777216, LENGTH_BYTES); // 2^(3*8)
} }
/*
#[test]
fn test_encode_struct() {
pub struct TestStruct {
pub one: u32,
pub two: H256,
pub three: u64,
pub four: U256,
}
impl Encodable for TestStruct {
fn ssz_append(&self, s: &mut SszStream) {
s.append(&self.one);
s.append(&self.two);
s.append(&self.three);
s.append(&self.four);
}
}
let t = TestStruct {
one: 1,
two: H256::zero(),
three: 100,
four: U256::zero(),
};
let mut s = SszStream::new();
s.append(&t);
let e = s.drain();
let expected_len = {
3 + 4 +
3 + 32 +
3 + 8 +
3 + 32
};
assert_eq!(e[0..4], [0, 0, 0, 4]);
assert_eq!(e[4..8], [0, 0, 0, 1]);
assert_eq!(e[8..12], [0, 0, 0, 32]);
assert_eq!(e[12..44], [0; 32]);
assert_eq!(e[44..48], [0, 0, 0, 8]);
assert_eq!(e[48..56], [0, 0, 0, 0, 0, 0, 0, 100]);
assert_eq!(e[56..60], [0, 0, 0, 32]);
assert_eq!(e[60..92], [0; 32]);
assert_eq!(e.len(), expected_len);
}
*/
} }