use assert_eq instead of assert in ptr2str tests

This commit is contained in:
gnzlbg 2018-11-09 11:45:14 +01:00 committed by gnzlbg
parent fd6f565209
commit ce78feb2c8
1 changed files with 2 additions and 2 deletions

View File

@ -402,7 +402,7 @@ mod tests {
let rstr = ptr2str(cstr as *const _ as *const c_char);
assert!(rstr.is_ok());
let rstr = rstr.unwrap();
assert!(rstr.len() == 1);
assert_eq!(rstr.len(), 1);
assert_eq!(rstr, b"\0");
}
{
@ -410,7 +410,7 @@ mod tests {
let rstr = ptr2str(cstr as *const _ as *const c_char);
assert!(rstr.is_ok());
let rstr = rstr.unwrap();
assert!(rstr.len() == b"foo baaar\0".len());
assert_eq!(rstr.len(), b"foo baaar\0".len());
assert_eq!(rstr, b"foo baaar\0");
}
}