-
Notifications
You must be signed in to change notification settings - Fork 33
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
4 changed files
with
33 additions
and
301 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
module/core/former/tests/inc/former_tests/only_test/parametrized_field.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,8 @@ | ||
|
||
#[ test ] | ||
fn basic() | ||
{ | ||
let got = Child::< 'static, str >::former().name( "abc" ).arg( "arg1" ).end(); | ||
let exp = Child::< 'static, str >{ name : "abc".into(), arg : "arg1" }; | ||
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
22 changes: 22 additions & 0 deletions
22
module/core/former/tests/inc/former_tests/parametrized_field_where.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,22 @@ | ||
#![ allow( dead_code ) ] | ||
#[ allow( unused_imports ) ] | ||
use super::*; | ||
|
||
/// Parameter description. | ||
#[ allow( explicit_outlives_requirements ) ] | ||
#[ derive( Debug, PartialEq, the_module::Former ) ] | ||
// #[ debug ] | ||
// #[ derive( Debug, PartialEq ) ] | ||
pub struct Child< 'child, T > | ||
where | ||
T : ?Sized + 'child, | ||
{ | ||
name : String, | ||
arg : &'child T, | ||
} | ||
|
||
// == begin of generated | ||
|
||
// == end of generated | ||
|
||
include!( "./only_test/parametrized_field.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