Skip to content

Commit

Permalink
fmt & macro tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza1311 committed Jul 19, 2022
1 parent 8fdfb9f commit 60f44ce
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 140 deletions.
16 changes: 16 additions & 0 deletions packages/yew-macro/tests/html_macro/component-fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ fn compile_fail() {
html! { <Child value=1 ref={()} ..props ref={()} /> };
html! { <Child ref={()} ref={()} value=1 with props /> };
html! { <Child ref={()} ref={()} value=1 ..props /> };
html! { <Child with props r#ref={()} r#ref={()} /> };
html! { <Child ..props r#ref={()} r#ref={()} /> };
html! { <Child with props r#ref={()} r#ref={()} value=1 /> };
html! { <Child ..props r#ref={()} r#ref={()} value=1 /> };
html! { <Child with props r#ref={()} value=1 r#ref={()} /> };
html! { <Child ..props r#ref={()} value=1 r#ref={()} /> };
html! { <Child with props value=1 r#ref={()} r#ref={()} /> };
html! { <Child ..props value=1 r#ref={()} r#ref={()} /> };
html! { <Child value=1 with props r#ref={()} r#ref={()} /> };
html! { <Child value=1 ..props r#ref={()} r#ref={()} /> };
html! { <Child value=1 r#ref={()} with props r#ref={()} /> };
html! { <Child value=1 r#ref={()} ..props r#ref={()} /> };
html! { <Child r#ref={()} r#ref={()} value=1 with props /> };
html! { <Child r#ref={()} r#ref={()} value=1 ..props /> };
html! { <Child ..blah /> };
html! { <Child value=1 ..props /> };
html! { <Child .. props value=1 /> };
Expand All @@ -79,6 +93,8 @@ fn compile_fail() {
html! { <Child int=1 string={3} /> };
html! { <Child int=1 ref={()} /> };
html! { <Child int=1 ref={()} ref={()} /> };
html! { <Child int=1 r#ref={()} /> };
html! { <Child int=1 r#ref={()} r#ref={()} /> };
html! { <Child int=0u32 /> };
html! { <Child string="abc" /> };
html! { </Child> };
Expand Down

0 comments on commit 60f44ce

Please sign in to comment.