-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
107 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,3 +96,6 @@ fn main() | |
// > }, | ||
// > } | ||
} | ||
|
||
// xxx2 : finish example former_custom_subformer | ||
|
21 changes: 21 additions & 0 deletions
21
module/core/former/tests/inc/former_tests/only_test/subformer_container_children2.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
#[ test ] | ||
fn container() | ||
{ | ||
|
||
let got = Parent::former() | ||
.children2() | ||
.add( Child::former().name( "a" ).form() ) | ||
.add( Child::former().name( "b" ).form() ) | ||
.end() | ||
.form(); | ||
|
||
let children = vec! | ||
[ | ||
Child { name : "a".to_string(), is_mandatory : false }, | ||
Child { name : "b".to_string(), is_mandatory : false }, | ||
]; | ||
let exp = Parent { children }; | ||
a_id!( got, exp ); | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
module/core/former/tests/inc/former_tests/only_test/subformer_scalar_children.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
#[ test ] | ||
fn scalar() | ||
{ | ||
|
||
let children = vec! | ||
[ | ||
Child { name : "a".to_string(), is_mandatory : false }, | ||
Child { name : "b".to_string(), is_mandatory : false }, | ||
]; | ||
let got = Parent::former() | ||
.children( children ) | ||
.form(); | ||
|
||
let children = vec! | ||
[ | ||
Child { name : "a".to_string(), is_mandatory : false }, | ||
Child { name : "b".to_string(), is_mandatory : false }, | ||
]; | ||
let exp = Parent { children }; | ||
a_id!( got, exp ); | ||
|
||
} |
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
module/core/former/tests/inc/former_tests/only_test/subformer_subform_children2.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
#[ test ] | ||
fn subform() | ||
{ | ||
|
||
let got = Parent::former() | ||
.children2( "a" ).end() | ||
.children2( "b" ).end() | ||
.form(); | ||
|
||
let children = vec! | ||
[ | ||
Child { name : "a".to_string(), is_mandatory : false }, | ||
Child { name : "b".to_string(), is_mandatory : false }, | ||
]; | ||
let exp = Parent { children }; | ||
a_id!( got, exp ); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,5 @@ fn basic() | |
a_id!( got.command.len(), 2 ); | ||
|
||
} | ||
|
||
// xxx2 : finish example former_custom_subformer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.