mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Added error_by_expected_size test.
This commit is contained in:
parent
84d05bd958
commit
ed681025b4
1 changed files with 7 additions and 0 deletions
|
|
@ -216,4 +216,11 @@ mod tests {
|
||||||
assert!(buffer::get_string_utf16_be(&data, &mut pos).is_err());
|
assert!(buffer::get_string_utf16_be(&data, &mut pos).is_err());
|
||||||
assert_eq!(pos, 10);
|
assert_eq!(pos, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn error_by_expected_size_test() {
|
||||||
|
assert!(error_by_expected_size(69, 69).is_ok());
|
||||||
|
assert!(error_by_expected_size(69, 68).is_err());
|
||||||
|
assert!(error_by_expected_size(69, 70).is_err());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue