diff --git a/crates/html-macro-test/src/tests/all_tests.rs b/crates/html-macro-test/src/tests/all_tests.rs index dcbac239..9b6ff367 100644 --- a/crates/html-macro-test/src/tests/all_tests.rs +++ b/crates/html-macro-test/src/tests/all_tests.rs @@ -7,7 +7,7 @@ use html_macro::html; use std::collections::HashMap; -use virtual_node::{IterableNodes, VElement, VText, View, VirtualNode}; +use virtual_node::{AttributeValue, IterableNodes, VElement, VText, View, VirtualNode}; #[must_use] pub(crate) struct HtmlMacroTest { @@ -28,7 +28,7 @@ fn empty_div() { generated: html! {
}, expected: VirtualNode::element("div"), } - .test(); + .test(); } #[test] @@ -43,7 +43,7 @@ fn one_attr() { generated: html! {
}, expected: expected.into(), } - .test(); + .test(); } #[test] @@ -55,7 +55,7 @@ fn child_node() { generated: html! {
}, expected: expected.into(), } - .test(); + .test(); } #[test] @@ -67,7 +67,7 @@ fn sibling_child_nodes() { generated: html! {
}, expected: expected.into(), } - .test(); + .test(); } /// Nested 3 nodes deep @@ -83,16 +83,15 @@ fn three_nodes_deep() { generated: html! {
}, expected: expected.into(), } - .test() + .test() } - // TODO: Requires proc macro APIs that are currently unstable - https://github.com/rust-lang/rust/issues/54725 // #[test] // fn sibling_text_nodes() { // let mut expected = VElement::new("div"); // expected.children = vec![VirtualNode::text("This is a text node")]; -// +// // HtmlMacroTest { // generated: html! {
This is a text node
}, // expected: expected.into(), @@ -116,7 +115,7 @@ fn nested_macro() { }, expected: expected.into(), } - .test(); + .test(); } /// If the first thing we see is a block then we grab whatever is inside it. @@ -132,7 +131,7 @@ fn block_root() { }, expected, } - .test(); + .test(); } // TODO: Requires proc macro APIs that are currently unstable - https://github.com/rust-lang/rust/issues/54725 @@ -140,13 +139,13 @@ fn block_root() { // #[test] // fn text_next_to_block() { // let child = html! { }; -// +// // let mut expected = VElement::new("div"); // expected.children = vec![ // VirtualNode::text(" A bit of text "), // VirtualNode::element("ul"), // ]; -// +// // HtmlMacroTest { // generated: html! { //
@@ -165,7 +164,7 @@ fn block_root() { // #[test] // fn punctuation_token() { // let text = "Hello, World"; -// +// // HtmlMacroTest { // generated: html! { Hello, World }, // expected: VirtualNode::text(text), @@ -184,22 +183,29 @@ fn vec_of_nodes() { generated: html! {
{ children }
}, expected: expected.into(), } - .test(); + .test(); } /// Just make sure that this compiles since as, async, for, loop, and type are keywords #[test] fn keyword_attribute() { - html! { } - ; - html! {