Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
YuliaProkopovych committed Apr 26, 2024
1 parent d40e335 commit 5ec88fe
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 5ec88fe

Please sign in to comment.