Move test to tests directory

This commit is contained in:
zypeh
2022-08-25 17:56:15 +08:00
committed by Lucas
parent f997a6250c
commit 9ded4d79d5
4 changed files with 85 additions and 21 deletions

View File

@@ -45,24 +45,3 @@ where
Ok(value)
}
#[cfg(test)]
mod test {
#[test]
fn encode_bool() {
let bytes = super::encode(&true).unwrap();
assert_eq!(bytes, vec![0b10000001]);
let bytes = super::encode(&false).unwrap();
assert_eq!(bytes, vec![0b00000001]);
}
#[test]
fn encode_u8() {
let bytes = super::encode(&3_u8).unwrap();
assert_eq!(bytes, vec![0b00000011, 0b00000001]);
}
}