Skip to content

Commit d1c3e70

Browse files
committed
Check expected bytes
Signed-off-by: Moritz Hoffmann <mh@materialize.com>
1 parent 9759007 commit d1c3e70

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/timely-util/src/containers.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -532,18 +532,21 @@ mod tests {
532532
assert_eq!(column_align2.iter().collect::<Vec<_>>(), vec![&1, &2, &3]);
533533
}
534534

535+
/// Assert the desired contents of raw_columnar_bytes so that diagnosing test failures is
536+
/// easier.
535537
#[mz_ore::test]
536-
fn test_column_from_bytes() {
537-
{
538-
let mut column: Column<i32> = Default::default();
539-
column.push_into(1);
540-
column.push_into(2);
541-
column.push_into(3);
542-
let mut data = Vec::new();
543-
column.into_bytes(&mut std::io::Cursor::new(&mut data));
544-
println!("data: {:?}", data);
545-
}
538+
fn test_column_known_bytes() {
539+
let mut column: Column<i32> = Default::default();
540+
column.push_into(1);
541+
column.push_into(2);
542+
column.push_into(3);
543+
let mut data = Vec::new();
544+
column.into_bytes(&mut std::io::Cursor::new(&mut data));
545+
assert_eq!(data, raw_columnar_bytes());
546+
}
546547

548+
#[mz_ore::test]
549+
fn test_column_from_bytes() {
547550
let raw = raw_columnar_bytes();
548551

549552
let buf = vec![0; raw.len() + 8];

0 commit comments

Comments
 (0)