Skip to content

Commit

Permalink
Merge pull request #1307 from YuliaProkopovych/graph-tools
Browse files Browse the repository at this point in the history
READY(graphs_tools): fix tests
  • Loading branch information
Wandalen authored Apr 29, 2024
2 parents d40e335 + 5ec88fe commit cd552f1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
1 change: 1 addition & 0 deletions module/move/graphs_tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ meta_tools = { workspace = true, features = [ "default" ] }
iter_tools = { workspace = true, features = [ "default" ] }
data_type = { workspace = true, features = [ "default" ] }
strs_tools = { workspace = true, features = [ "default" ] }
derive_tools = { workspace = true, features = [ "default" ] }
# type_constructor ={ workspace = true, features = [ "default" ] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion module/move/graphs_tools/src/abs/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub( crate ) mod private
// }

///
/// Interface to identify an instance of somthing with ability to increase it to generate a new one.
/// Interface to identify an instance of something with ability to increase it to generate a new one.
///

pub trait IdentityGeneratorInterface< Id >
Expand Down
15 changes: 10 additions & 5 deletions module/move/graphs_tools/src/canonical/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,17 @@ pub( crate ) mod private
// =
//

type_constructor::types!
{
// type_constructor::types!
// {
// /// Identify an instance by integer.
// #[ derive( PartialEq, Eq, Copy, Clone, Hash ) ]
// pub single IdentityWithInt : isize;
// }


/// Identify an instance by integer.
#[ derive( PartialEq, Eq, Copy, Clone, Hash ) ]
pub single IdentityWithInt : isize;
}
#[ derive( PartialEq, Eq, Copy, Clone, Hash, derive_tools::From, derive_tools::Deref ) ]
pub struct IdentityWithInt( isize );

///
/// Interface to to generate a new IDs for IdentityWithInt
Expand Down
14 changes: 7 additions & 7 deletions module/move/graphs_tools/tests/inc/identity_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ tests_impls!
// }

/* test.case( "from x2 tupple" ) */
{
use type_constructor::VectorizedInto;
let src = ( 1, 3 );
let got : ( IdentityWithInt, IdentityWithInt ) = src.vectorized_into();
let exp = ( IdentityWithInt::from( 1 ), IdentityWithInt::from( 3 ) );
a_id!( got, exp );
}
// {
// //use type_constructor::VectorizedInto;
// let src = ( 1, 3 );
// let got : ( IdentityWithInt, IdentityWithInt ) = src.into();
// let exp = ( IdentityWithInt::from( 1 ), IdentityWithInt::from( 3 ) );
// a_id!( got, exp );
// }

// /* test.case( "from x3 tupple" ) */
// {
Expand Down

0 comments on commit cd552f1

Please sign in to comment.