make some tests not need output (so they work on wasm)

This commit is contained in:
Ralf Jung 2024-05-04 13:00:59 +02:00
parent 38598e68c5
commit 05e7850d7a
6 changed files with 6 additions and 10 deletions

View File

@ -62,7 +62,10 @@ fn test_from_utf8() {
const N: usize = 10;
let vec = vec![0x4141414141414141u64; N];
let content = unsafe { std::slice::from_raw_parts(vec.as_ptr() as *const u8, 8 * N) };
println!("{:?}", std::str::from_utf8(content).unwrap());
assert_eq!(
std::str::from_utf8(content).unwrap(),
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
);
}
fn test_u64_array() {

View File

@ -1 +0,0 @@
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"

View File

@ -31,8 +31,8 @@ fn main() {
}
// Regression test for Debug impl's
println!("{:?} {:?}", dst, dst.iter());
println!("{:?}", VecDeque::<u32>::new().iter());
format!("{:?} {:?}", dst, dst.iter());
format!("{:?}", VecDeque::<u32>::new().iter());
for a in dst {
assert_eq!(*a, 2);

View File

@ -1,2 +0,0 @@
[2, 2] Iter([2, 2], [])
Iter([], [])

View File

@ -1,2 +0,0 @@
[2, 2] Iter([2, 2], [])
Iter([], [])

View File

@ -1,2 +0,0 @@
[2, 2] Iter([2, 2], [])
Iter([], [])