Skip to content

Commit

Permalink
former : experimenting
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed Apr 2, 2024
1 parent ccf0d30 commit 789d394
Showing 1 changed file with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,33 @@ tests_impls_optional!
let former2 : Struct1Former = Struct1Former::new( former::ReturnPreformed );
a_id!( std::mem::size_of_val( &former ), std::mem::size_of_val( &former2 ) );

// default explicit params with wrapper and closure
// closure without helper
let got : Struct1 = Struct1Former
::< Struct1FormerDefinition< _, _, former::FormingEndClosure< Struct1FormerDefinitionTypes< (), Struct1 > > > >
::new( | storage : Struct1FormerStorage, _context | { former::StoragePreform::preform( storage ) } )
.vec_1().replace( vec![ "a".to_string(), "b".to_string() ] ).end()
.form();
let exp : Struct1 = Struct1
{
vec_1 : vec![ "a".to_string(), "b".to_string() ],
hashmap_strings_1 : hmap!{},
hashset_strings_1 : hset!{},
};
a_id!( got, exp );

// closure with helper
let got : Struct1 = Struct1Former
::< Struct1FormerWithClosure< (), Struct1 > >
::new( | storage, _context | { former::StoragePreform::preform( storage ) } )
.vec_1().replace( vec![ "a".to_string(), "b".to_string() ] )
::new( | storage : Struct1FormerStorage, _context | { former::StoragePreform::preform( storage ) } )
.vec_1().replace( vec![ "a".to_string(), "b".to_string() ] ).end()
.form();
let exp : Struct1 = Struct1
{
vec_1 : vec![ "a".to_string(), "b".to_string() ],
hashmap_strings_1 : hmap!{},
hashset_strings_1 : hset!{},
};
// a_id!( got, exp );
// xxx : ?
a_id!( got, exp );

}

Expand Down

0 comments on commit 789d394

Please sign in to comment.