From 2b45bd6d6dc8352fb195cc022ce786bfa5b5bf16 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Tue, 20 Aug 2024 17:09:27 -0700 Subject: [PATCH] fixup! Add `ShowLabels` component. --- crates/store/re_types/tests/arrows3d.rs | 23 +++++++++++++++++++++++ crates/store/re_types/tests/points3d.rs | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/crates/store/re_types/tests/arrows3d.rs b/crates/store/re_types/tests/arrows3d.rs index b06f3fe9eb95..3e8601c82fbb 100644 --- a/crates/store/re_types/tests/arrows3d.rs +++ b/crates/store/re_types/tests/arrows3d.rs @@ -55,4 +55,27 @@ fn roundtrip() { ("show_labels", vec!["rerun.components.ShowLabels"]), ] .into(); + + eprintln!("arch = {arch:#?}"); + let serialized = arch.to_arrow().unwrap(); + for (field, array) in &serialized { + // NOTE: Keep those around please, very useful when debugging. + // eprintln!("field = {field:#?}"); + // eprintln!("array = {array:#?}"); + eprintln!("{} = {array:#?}", field.name); + + // TODO(cmc): Re-enable extensions and these assertions once `arrow2-convert` + // has been fully replaced. + if false { + util::assert_extensions( + &**array, + expected_extensions[field.name.as_str()].as_slice(), + ); + } + } + + let deserialized = Arrows3D::from_arrow(serialized).unwrap(); + similar_asserts::assert_eq!(expected, deserialized); } + +mod util; diff --git a/crates/store/re_types/tests/points3d.rs b/crates/store/re_types/tests/points3d.rs index 86acf42962da..a2114eaabdc4 100644 --- a/crates/store/re_types/tests/points3d.rs +++ b/crates/store/re_types/tests/points3d.rs @@ -48,7 +48,7 @@ fn roundtrip() { ("labels", vec!["rerun.components.Text"]), ("class_ids", vec!["rerun.components.ClassId"]), ("keypoint_ids", vec!["rerun.components.KeypointId"]), - ("show_labels", vec!["rerun.components.Bool"]), + ("show_labels", vec!["rerun.components.ShowLabels"]), ] .into();