forked from Wandalen/wTools
-
Notifications
You must be signed in to change notification settings - Fork 0
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
28 changed files
with
170 additions
and
146 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
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
36 changes: 0 additions & 36 deletions
36
module/core/former/tests/inc/all/former_hashmap_without_parameter.rs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
module/core/former/tests/inc/all/former_hashmap_without_parameter.stderr
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
module/core/former/tests/inc/all/former_vector_without_parameter.stderr
This file was deleted.
Oops, something went wrong.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...rmer/tests/inc/all/former_bad_attr.stderr → ...ts/inc/compiletime/former_bad_attr.stderr
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
error: Unknown attribute #[defaultx(31)] | ||
--> tests/inc/all/former_bad_attr.rs:6:3 | ||
--> tests/inc/compiletime/former_bad_attr.rs:6:3 | ||
| | ||
6 | #[ defaultx( 31 ) ] | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: cannot find attribute `defaultx` in this scope | ||
--> tests/inc/all/former_bad_attr.rs:6:6 | ||
--> tests/inc/compiletime/former_bad_attr.rs:6:6 | ||
| | ||
6 | #[ defaultx( 31 ) ] | ||
| ^^^^^^^^ help: a derive helper attribute with a similar name exists: `default` |
16 changes: 16 additions & 0 deletions
16
module/core/former/tests/inc/compiletime/former_hashmap_without_parameter.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,16 @@ | ||
use former::Former; | ||
|
||
struct HashMap< T > | ||
{ | ||
f1 : T, | ||
} | ||
|
||
#[derive( Former )] | ||
pub struct Struct1 | ||
{ | ||
f2 : HashMap< i32 >, | ||
} | ||
|
||
fn main() | ||
{ | ||
} |
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 |
---|---|---|
|
@@ -52,4 +52,4 @@ pub struct Struct1 | |
|
||
// | ||
|
||
include!( "basic_only_test.rs" ); | ||
include!( "only_test/basic.rs" ); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions
36
module/core/former/tests/inc/former_hashmap_without_parameter.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,36 @@ | ||
use super::*; | ||
use TheModule::Former; | ||
|
||
#[ derive( Debug, PartialEq ) ] | ||
struct HashMap< T > | ||
{ | ||
pub f1 : T, | ||
} | ||
|
||
#[ derive( Debug, PartialEq, Former ) ] | ||
pub struct Struct1 | ||
{ | ||
f2 : HashMap< i32 >, | ||
} | ||
|
||
tests_impls! | ||
{ | ||
|
||
// Name conflict is not a problem. | ||
fn basic() | ||
{ | ||
|
||
let got = Struct1::former().f2( HashMap { f1 : 3 } ).form(); | ||
let expected = Struct1 { f2 : HashMap { f1 : 3 } }; | ||
a_id!( got, expected ); | ||
|
||
} | ||
|
||
} | ||
|
||
// | ||
|
||
tests_index! | ||
{ | ||
basic, | ||
} |
36 changes: 36 additions & 0 deletions
36
module/core/former/tests/inc/former_vector_without_parameter.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,36 @@ | ||
use super::*; | ||
use TheModule::Former; | ||
|
||
#[ derive( Debug, PartialEq ) ] | ||
struct Vec | ||
{ | ||
f1 : i32, | ||
} | ||
|
||
#[ derive( Debug, PartialEq, Former ) ] | ||
pub struct Struct1 | ||
{ | ||
f2 : Vec<>, | ||
} | ||
|
||
tests_impls! | ||
{ | ||
|
||
// Name conflict is not a problem. | ||
fn basic() | ||
{ | ||
|
||
let got = Struct1::former().f2( Vec { f1 : 3 } ).form(); | ||
let expected = Struct1 { f2 : Vec { f1 : 3 } }; | ||
a_id!( got, expected ); | ||
|
||
} | ||
|
||
} | ||
|
||
// | ||
|
||
tests_index! | ||
{ | ||
basic, | ||
} |
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
File renamed without changes.
File renamed without changes.
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.