Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

READY(graphs_tools): fix tests #1307

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading