Skip to content

Commit

Permalink
fixup! Add ShowLabels component.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Aug 21, 2024
1 parent a07dcaa commit 2b45bd6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions crates/store/re_types/tests/arrows3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion crates/store/re_types/tests/points3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 2b45bd6

Please sign in to comment.