Skip to content

Commit f8c09d3

Browse files
committed
add debug print test case
1 parent 550b2cc commit f8c09d3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/yew/src/dom_bundle/position.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,4 +253,15 @@ mod layout_tests {
253253
"expected {target:#?} to point to the same position as {replacement:#?}"
254254
);
255255
}
256+
257+
#[test]
258+
fn debug_printing() {
259+
// basic tests that these don't panic. We don't enforce any specific format.
260+
println!("At end: {:?}", DomSlot::at_end());
261+
println!("Trapped: {:?}", DomSlot::new_debug_trapped());
262+
println!(
263+
"At element: {:?}",
264+
DomSlot::at(document().create_element("p").unwrap().into())
265+
);
266+
}
256267
}

0 commit comments

Comments
 (0)