-
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.
Merge pull request #1337 from Wandalen/program_tools_v1
AUTO : Forward from program_tools_v1 to alpha
- Loading branch information
Showing
21 changed files
with
148 additions
and
108 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
//! qqq : write proper description | ||
//! qqq : for Petro : write proper description | ||
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
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
2 changes: 1 addition & 1 deletion
2
module/core/derive_tools/tests/inc/from_inner_multiple_named_test.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
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,6 +1,6 @@ | ||
use super::*; | ||
|
||
#[ derive( Debug, PartialEq, Eq, the_module::FromInner ) ] | ||
#[ derive( Debug, PartialEq, Eq, the_module::From ) ] | ||
struct StructWithManyFields( i32, bool ); | ||
|
||
include!( "./only_test/from_inner_multiple.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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use super::*; | ||
|
||
#[ derive( Debug, Clone, Copy, PartialEq, the_module::FromInner ) ] | ||
#[ derive( Debug, Clone, Copy, PartialEq, the_module::From ) ] | ||
struct UnitStruct; | ||
|
||
include!( "./only_test/from_inner_unit.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,27 @@ | ||
|
||
#[ derive( Debug, PartialEq ) ] | ||
pub enum GetData | ||
{ | ||
FromString( String ), | ||
FromBin( &'static [ u8 ] ), | ||
} | ||
|
||
impl From< String > for GetData | ||
{ | ||
#[ inline ] | ||
fn from( src : String ) -> Self | ||
{ | ||
Self::FromString( src ) | ||
} | ||
} | ||
|
||
impl From< &'static [ u8 ] > for GetData | ||
{ | ||
#[ inline ] | ||
fn from( src : &'static [ u8 ] ) -> Self | ||
{ | ||
Self::FromBin( src ) | ||
} | ||
} | ||
|
||
include!( "./only_test/from_inner_variants.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
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
15 changes: 15 additions & 0 deletions
15
module/core/derive_tools/tests/inc/only_test/from_inner_variants.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,15 @@ | ||
use super::*; | ||
|
||
#[ test ] | ||
fn from_inner_named() | ||
{ | ||
|
||
let got : GetData = From::from( "abc".to_string() ); | ||
let exp = GetData::FromString( "abc".to_string() ); | ||
a_id!( got, exp ); | ||
|
||
let got : GetData = From::from( &b"abc"[ .. ] ); | ||
let exp = GetData::FromBin( b"abc" ); | ||
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
Oops, something went wrong.