diff --git a/module/core/former/tests/inc/former_tests/name_collision_context.rs b/module/core/former/tests/inc/former_tests/name_collision_context.rs index 8123626a1d..ca4b73fc02 100644 --- a/module/core/former/tests/inc/former_tests/name_collision_context.rs +++ b/module/core/former/tests/inc/former_tests/name_collision_context.rs @@ -3,13 +3,17 @@ #[ allow( unused_imports ) ] use super::*; + +pub mod core {} +pub mod std {} +pub mod marker {} pub trait CloneAny{} -pub trait End{} +// pub trait Context{} pub trait Formed{} pub trait OnEnd{} #[ derive( Clone, the_module::Former ) ] pub struct Context { - inner : std::sync::Arc< core::cell::RefCell< dyn CloneAny > > + inner : ::std::sync::Arc< ::core::cell::RefCell< dyn CloneAny > > } diff --git a/module/core/former/tests/inc/former_tests/name_collision_core.rs b/module/core/former/tests/inc/former_tests/name_collision_core.rs new file mode 100644 index 0000000000..8cdf38cb3f --- /dev/null +++ b/module/core/former/tests/inc/former_tests/name_collision_core.rs @@ -0,0 +1,19 @@ +#![ allow( dead_code ) ] +#![ allow( non_camel_case_types ) ] + +#[ allow( unused_imports ) ] +use super::*; + +// pub mod core {} +pub mod std {} +pub mod marker {} +pub trait CloneAny{} +pub trait Context{} +pub trait Formed{} +pub trait OnEnd{} + +#[ derive( Clone, the_module::Former ) ] +pub struct core +{ + inner : ::std::sync::Arc< ::core::cell::RefCell< dyn CloneAny > > +} diff --git a/module/core/former/tests/inc/former_tests/name_collision_end.rs b/module/core/former/tests/inc/former_tests/name_collision_end.rs index 99f736019d..b998b6153c 100644 --- a/module/core/former/tests/inc/former_tests/name_collision_end.rs +++ b/module/core/former/tests/inc/former_tests/name_collision_end.rs @@ -3,6 +3,9 @@ #[ allow( unused_imports ) ] use super::*; +pub mod core {} +pub mod std {} +pub mod marker {} pub trait CloneAny{} pub trait Context{} pub trait Formed{} @@ -13,7 +16,7 @@ pub trait OnEnd{} // #[ derive( Clone ) ] pub struct End { - inner : std::sync::Arc< core::cell::RefCell< dyn CloneAny > > + inner : ::std::sync::Arc< ::core::cell::RefCell< dyn CloneAny > > } // = begin_coercing of generated diff --git a/module/core/former/tests/inc/former_tests/name_collision_former_hashmap_without_parameter.rs b/module/core/former/tests/inc/former_tests/name_collision_former_hashmap_without_parameter.rs index dd533926c6..31df1f43e6 100644 --- a/module/core/former/tests/inc/former_tests/name_collision_former_hashmap_without_parameter.rs +++ b/module/core/former/tests/inc/former_tests/name_collision_former_hashmap_without_parameter.rs @@ -1,6 +1,14 @@ use super::*; use the_module::Former; +pub mod core {} +pub mod std {} +pub mod marker {} +pub trait CloneAny{} +pub trait Context{} +pub trait Formed{} +pub trait OnEnd{} + #[ derive( Debug, PartialEq ) ] struct HashMap< T > { diff --git a/module/core/former/tests/inc/former_tests/name_collision_former_vector_without_parameter.rs b/module/core/former/tests/inc/former_tests/name_collision_former_vector_without_parameter.rs index 87f073d348..c79d0e8ba3 100644 --- a/module/core/former/tests/inc/former_tests/name_collision_former_vector_without_parameter.rs +++ b/module/core/former/tests/inc/former_tests/name_collision_former_vector_without_parameter.rs @@ -1,6 +1,14 @@ use super::*; use the_module::Former; +pub mod core {} +pub mod std {} +pub mod marker {} +pub trait CloneAny{} +pub trait Context{} +pub trait Formed{} +pub trait OnEnd{} + #[ derive( Debug, PartialEq ) ] struct Vec { diff --git a/module/core/former/tests/inc/former_tests/name_collision_on_end.rs b/module/core/former/tests/inc/former_tests/name_collision_on_end.rs index d7bf8109cd..3645d92588 100644 --- a/module/core/former/tests/inc/former_tests/name_collision_on_end.rs +++ b/module/core/former/tests/inc/former_tests/name_collision_on_end.rs @@ -3,12 +3,16 @@ #[ allow( unused_imports ) ] use super::*; +pub mod core {} +pub mod std {} +pub mod marker {} pub trait CloneAny{} pub trait Context{} -pub trait End{} +pub trait Formed{} +// pub trait OnEnd{} #[ derive( Clone, the_module::Former ) ] pub struct OnEnd { - inner : std::sync::Arc< core::cell::RefCell< dyn CloneAny > > + inner : ::std::sync::Arc< ::core::cell::RefCell< dyn CloneAny > > } diff --git a/module/core/former/tests/inc/former_tests/name_collisions.rs b/module/core/former/tests/inc/former_tests/name_collisions.rs index 9d935c81b8..29b4d6ea74 100644 --- a/module/core/former/tests/inc/former_tests/name_collisions.rs +++ b/module/core/former/tests/inc/former_tests/name_collisions.rs @@ -1,6 +1,13 @@ #[ allow( unused_imports ) ] use super::*; +pub mod core {} +pub mod std {} +pub trait CloneAny{} +pub trait Context{} +pub trait Formed{} +pub trait OnEnd{} + #[ allow( dead_code ) ] type Option = (); #[ allow( dead_code ) ] @@ -28,8 +35,8 @@ type HashMap = (); pub struct Struct1 { vec_1 : Vec< String >, - hashmap_1 : std::collections::HashMap< String, String >, - hashset_1 : std::collections::HashSet< String >, + hashmap_1 : ::std::collections::HashMap< String, String >, + hashset_1 : ::std::collections::HashSet< String >, } // diff --git a/module/core/former/tests/inc/former_tests/only_test/basic.rs b/module/core/former/tests/inc/former_tests/only_test/basic.rs index a4b4dbf907..a3a0f00e2b 100644 --- a/module/core/former/tests/inc/former_tests/only_test/basic.rs +++ b/module/core/former/tests/inc/former_tests/only_test/basic.rs @@ -16,9 +16,9 @@ tests_impls! a_id!( former.context, None ); a_id!( print!( "{:?}", former.on_end ), print!( "{:?}", Some( the_module::ReturnPreformed ) ) ); let former2 = Struct1Former::< Struct1FormerDefinition< (), Struct1, former::ReturnPreformed > >::new_coercing( former::ReturnPreformed ); - a_id!( std::mem::size_of_val( &former ), std::mem::size_of_val( &former2 ) ); + a_id!( ::std::mem::size_of_val( &former ), ::std::mem::size_of_val( &former2 ) ); let former2 = Struct1Former::< Struct1FormerDefinition< (), Struct1, former::ReturnPreformed > >::new( former::ReturnPreformed ); - a_id!( std::mem::size_of_val( &former ), std::mem::size_of_val( &former2 ) ); + a_id!( ::std::mem::size_of_val( &former ), ::std::mem::size_of_val( &former2 ) ); let command = Struct1::former().form(); a_id!( command.int_1, 0 ); @@ -255,7 +255,7 @@ tests_impls! // basic case let former = Struct1::former(); let former2 = Struct1Former::< Struct1FormerDefinition< (), Struct1, former::ReturnPreformed > >::new( former::ReturnPreformed ); - a_id!( std::mem::size_of_val( &former ), std::mem::size_of_val( &former2 ) ); + a_id!( ::std::mem::size_of_val( &former ), ::std::mem::size_of_val( &former2 ) ); let exp = former.form(); let got = former2.form(); a_id!( got, exp ); @@ -324,7 +324,7 @@ tests_impls! // basic case let former = Struct1::former(); let former2 = Struct1Former::< Struct1FormerDefinition< (), Struct1, former::ReturnPreformed > >::new( former::ReturnPreformed ); - a_id!( std::mem::size_of_val( &former ), std::mem::size_of_val( &former2 ) ); + a_id!( ::std::mem::size_of_val( &former ), ::std::mem::size_of_val( &former2 ) ); let exp = former.form(); let got = former2.form(); a_id!( got, exp ); diff --git a/module/core/former/tests/inc/former_tests/only_test/collections_with_subformer.rs b/module/core/former/tests/inc/former_tests/only_test/collections_with_subformer.rs index 0c57911f19..af852eda03 100644 --- a/module/core/former/tests/inc/former_tests/only_test/collections_with_subformer.rs +++ b/module/core/former/tests/inc/former_tests/only_test/collections_with_subformer.rs @@ -51,12 +51,12 @@ tests_impls! let former = Struct1::former(); a_id!( print!( "{:?}", former.on_end ), print!( "{:?}", Some( the_module::ReturnPreformed ) ) ); let former2 = Struct1Former::< Struct1FormerDefinition >::new_coercing( former::ReturnPreformed ); - a_id!( std::mem::size_of_val( &former ), std::mem::size_of_val( &former2 ) ); + a_id!( ::std::mem::size_of_val( &former ), ::std::mem::size_of_val( &former2 ) ); // default parameters let former = Struct1::former(); let former2 : Struct1Former = Struct1Former::new_coercing( former::ReturnPreformed ); - a_id!( std::mem::size_of_val( &former ), std::mem::size_of_val( &former2 ) ); + a_id!( ::std::mem::size_of_val( &former ), ::std::mem::size_of_val( &former2 ) ); // closure without helper let got : Struct1 = Struct1Former diff --git a/module/core/former/tests/inc/former_tests/only_test/collections_without_subformer.rs b/module/core/former/tests/inc/former_tests/only_test/collections_without_subformer.rs index c19e92eead..42f00f6b88 100644 --- a/module/core/former/tests/inc/former_tests/only_test/collections_without_subformer.rs +++ b/module/core/former/tests/inc/former_tests/only_test/collections_without_subformer.rs @@ -20,7 +20,7 @@ tests_impls! a_id!( former.context, None ); a_id!( print!( "{:?}", former.on_end ), print!( "{:?}", Some( the_module::ReturnPreformed ) ) ); let former2 = Struct1Former::< Struct1FormerDefinition >::new_coercing( the_module::ReturnPreformed ); - a_id!( std::mem::size_of_val( &former ), std::mem::size_of_val( &former2 ) ); + a_id!( ::std::mem::size_of_val( &former ), ::std::mem::size_of_val( &former2 ) ); let command = Struct1::former().form(); a_id!( command.vec_1, Vec::< String >::new() ); diff --git a/module/core/former/tests/inc/former_tests/only_test/subform_basic.rs b/module/core/former/tests/inc/former_tests/only_test/subform_basic.rs index ea039d9835..d4643ae291 100644 --- a/module/core/former/tests/inc/former_tests/only_test/subform_basic.rs +++ b/module/core/former/tests/inc/former_tests/only_test/subform_basic.rs @@ -13,7 +13,7 @@ // ; // ca.execute( input ).unwrap(); -// qqq : for Antont : zzz : here and in all similar tests remove `#[ cfg( not( feature = "use_alloc" ) ) ]` +// qqq : for Anton : zzz : here and in all similar tests remove `#[ cfg( not( feature = "use_alloc" ) ) ]` #[ cfg( not( feature = "use_alloc" ) ) ] #[ test ] fn command_with_closure() diff --git a/module/core/former/tests/inc/mod.rs b/module/core/former/tests/inc/mod.rs index 9f94e5f37d..416e680242 100644 --- a/module/core/former/tests/inc/mod.rs +++ b/module/core/former/tests/inc/mod.rs @@ -42,6 +42,7 @@ mod former_tests mod name_collision_context; mod name_collision_end; mod name_collision_on_end; + mod name_collision_core; // = parametrization diff --git a/module/core/former_meta/src/derive_former.rs b/module/core/former_meta/src/derive_former.rs index 4294f844b6..0a584b0db2 100644 --- a/module/core/former_meta/src/derive_former.rs +++ b/module/core/former_meta/src/derive_former.rs @@ -400,7 +400,7 @@ specific needs of the broader forming context. It mandates the implementation of where #former_definition_types_generics_where { - // _phantom : core::marker::PhantomData< ( __Context, __Formed ) >, + // _phantom : ::core::marker::PhantomData< ( __Context, __Formed ) >, _phantom : #former_definition_types_phantom, } @@ -413,7 +413,7 @@ specific needs of the broader forming context. It mandates the implementation of { Self { - _phantom : core::marker::PhantomData, + _phantom : ::core::marker::PhantomData, } } } @@ -436,7 +436,7 @@ specific needs of the broader forming context. It mandates the implementation of where #former_definition_generics_where { - // _phantom : core::marker::PhantomData< ( __Context, __Formed, __End ) >, + // _phantom : ::core::marker::PhantomData< ( __Context, __Formed, __End ) >, _phantom : #former_definition_phantom, } @@ -449,7 +449,7 @@ specific needs of the broader forming context. It mandates the implementation of { Self { - _phantom : core::marker::PhantomData, + _phantom : ::core::marker::PhantomData, } } } @@ -544,10 +544,10 @@ specific needs of the broader forming context. It mandates the implementation of pub storage : Definition::Storage, /// An optional context providing additional data or state necessary for custom /// formation logic or to facilitate this former's role as a subformer within another former. - pub context : core::option::Option< Definition::Context >, + pub context : ::core::option::Option< Definition::Context >, /// An optional closure or handler that is invoked to transform the accumulated /// temporary storage into the final object structure once formation is complete. - pub on_end : core::option::Option< Definition::End >, + pub on_end : ::core::option::Option< Definition::End >, } #[ automatically_derived ] @@ -587,8 +587,8 @@ specific needs of the broader forming context. It mandates the implementation of #[ inline( always ) ] pub fn begin ( - mut storage : core::option::Option< Definition::Storage >, - context : core::option::Option< Definition::Context >, + mut storage : ::core::option::Option< Definition::Storage >, + context : ::core::option::Option< Definition::Context >, on_end : < Definition as former::FormerDefinition >::End, ) -> Self @@ -611,8 +611,8 @@ specific needs of the broader forming context. It mandates the implementation of #[ inline( always ) ] pub fn begin_coercing< IntoEnd > ( - mut storage : core::option::Option< Definition::Storage >, - context : core::option::Option< Definition::Context >, + mut storage : ::core::option::Option< Definition::Storage >, + context : ::core::option::Option< Definition::Context >, on_end : IntoEnd, ) -> Self where @@ -714,8 +714,8 @@ specific needs of the broader forming context. It mandates the implementation of #[ inline( always ) ] fn former_begin ( - storage : core::option::Option< Definition::Storage >, - context : core::option::Option< Definition::Context >, + storage : ::core::option::Option< Definition::Storage >, + context : ::core::option::Option< Definition::Context >, on_end : Definition::End, ) -> Self diff --git a/module/core/macro_tools/src/phantom.rs b/module/core/macro_tools/src/phantom.rs index 7c9e3bbbda..bee74e1d49 100644 --- a/module/core/macro_tools/src/phantom.rs +++ b/module/core/macro_tools/src/phantom.rs @@ -116,7 +116,7 @@ pub( crate ) mod private /// let generics: Punctuated< GenericParam, Comma > = parse_quote! { 'a, T, const N : usize }; /// let phantom_type = tuple( &generics ); /// println!( "{}", quote::quote! { #phantom_type } ); - /// // Output: core::marker::PhantomData< ( &'a (), *const T, N ) > + /// // Output : ::core::marker::PhantomData< ( &'a (), *const T, N ) > /// ``` /// pub fn tuple( input : &syn::punctuated::Punctuated< syn::GenericParam, syn::token::Comma > ) -> syn::Type @@ -165,7 +165,7 @@ pub( crate ) mod private let result : syn::Type = syn::parse_quote! { - core::marker::PhantomData< #generics_tuple_type > + ::core::marker::PhantomData< #generics_tuple_type > }; result diff --git a/module/core/macro_tools/tests/inc/phantom.rs b/module/core/macro_tools/tests/inc/phantom.rs index 990a63d2e7..44c3610e66 100644 --- a/module/core/macro_tools/tests/inc/phantom.rs +++ b/module/core/macro_tools/tests/inc/phantom.rs @@ -18,7 +18,7 @@ fn phantom_add_basic() pub struct Struct1< 'a, Context, Formed > { f1 : int32, - _phantom : core::marker::PhantomData< ( &'a(), *const Context, *const Formed ) >, + _phantom : ::core::marker::PhantomData< ( &'a(), *const Context, *const Formed ) >, } }; @@ -64,7 +64,7 @@ fn phantom_add_type_generics() { struct TestStruct< T, U > { - _phantom : core::marker::PhantomData< ( *const T, *const U ) >, + _phantom : ::core::marker::PhantomData< ( *const T, *const U ) >, } }; @@ -86,7 +86,7 @@ fn phantom_add_lifetime_generics() { struct TestStruct< 'a, 'b > { - _phantom : core::marker::PhantomData< ( &'a (), &'b () ) >, + _phantom : ::core::marker::PhantomData< ( &'a (), &'b () ) >, } }; @@ -108,7 +108,7 @@ fn phantom_add_const_generics() { struct TestStruct< const N : usize > { - _phantom : core::marker::PhantomData< ( N, ) >, + _phantom : ::core::marker::PhantomData< ( N, ) >, } }; @@ -130,7 +130,7 @@ fn phantom_add_mixed_generics() { struct TestStruct< T, 'a, const N : usize > { - _phantom : core::marker::PhantomData< ( *const T, &'a (), N ) >, + _phantom : ::core::marker::PhantomData< ( *const T, &'a (), N ) >, } }; @@ -191,7 +191,7 @@ fn phantom_add_unnamed_fields_with_generics() struct TestStruct< T, U > ( T, U, - core::marker::PhantomData< ( *const T, *const U ) >, + ::core::marker::PhantomData< ( *const T, *const U ) >, ); }; @@ -215,7 +215,7 @@ fn phantom_add_unnamed_fields_lifetime_generics() ( &'a i32, &'b f64, - core::marker::PhantomData< ( &'a (), &'b () ) >, + ::core::marker::PhantomData< ( &'a (), &'b () ) >, ); }; @@ -238,7 +238,7 @@ fn phantom_add_unnamed_fields_const_generics() struct TestStruct< const N : usize > ( [ i32 ; N ], - core::marker::PhantomData< ( N, ) >, + ::core::marker::PhantomData< ( N, ) >, ); }; @@ -257,7 +257,7 @@ fn phantom_tuple_empty_generics() let input : Punctuated< GenericParam, Comma > = Punctuated::new(); let result = tuple( &input ); - let exp : syn::Type = parse_quote! { core::marker::PhantomData<()> }; + let exp : syn::Type = parse_quote! { ::core::marker::PhantomData<()> }; let got = result; assert_eq!( format!( "{:?}", exp ), format!( "{:?}", got ), "Expected empty PhantomData, got: {:?}", got ); @@ -274,7 +274,7 @@ fn phantom_tuple_only_type_parameters() let input : Punctuated< GenericParam, Comma > = parse_quote! { T, U }; let result = tuple( &input ); - let exp : syn::Type = parse_quote! { core::marker::PhantomData< ( *const T, *const U ) > }; + let exp : syn::Type = parse_quote! { ::core::marker::PhantomData< ( *const T, *const U ) > }; let got = result; assert_eq!( format!( "{:?}", exp ), format!( "{:?}", got ), "Expected PhantomData with type parameters, got: {:?}", got ); @@ -291,7 +291,7 @@ fn phantom_tuple_mixed_generics() let input : Punctuated< GenericParam, Comma > = parse_quote! { T, 'a, const N: usize }; let result = tuple( &input ); - let exp : syn::Type = parse_quote! { core::marker::PhantomData< ( *const T, &'a (), N ) > }; + let exp : syn::Type = parse_quote! { ::core::marker::PhantomData< ( *const T, &'a (), N ) > }; let got = result; assert_eq!( format!( "{:?}", exp ), format!( "{:?}", got ), "Expected PhantomData with mixed generics, got: {:?}", got ); diff --git a/module/core/program_tools/src/lib.rs b/module/core/program_tools/src/lib.rs index ced6f3d8d8..19ad8b5017 100644 --- a/module/core/program_tools/src/lib.rs +++ b/module/core/program_tools/src/lib.rs @@ -4,7 +4,7 @@ #![ doc( html_root_url = "https://docs.rs/program_tools/latest/program_tools/" ) ] #![ doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "Readme.md" ) ) ] -#![ allow( unused_imports, dead_code ) ] // xxx : rid off +#![ allow( unused_imports, dead_code, missing_docs ) ] // xxx : rid off #[ cfg( feature = "enabled" ) ] use mod_interface::mod_interface; diff --git a/module/core/program_tools/src/program.rs b/module/core/program_tools/src/program.rs index 83c83d4019..bb0c7aa51d 100644 --- a/module/core/program_tools/src/program.rs +++ b/module/core/program_tools/src/program.rs @@ -2,8 +2,6 @@ pub( crate ) mod private { - // xxx2 : get completed - use former::Former; use std:: { @@ -11,11 +9,54 @@ pub( crate ) mod private // process::Command, }; + // xxx2 : get completed + #[ derive( Debug, Default, Former ) ] - pub struct SourceFile + // #[ debug ] + pub struct Program { - file_path : PathBuf, - data : GetData, + pub write_path : Option< PathBuf >, + pub read_path : Option< PathBuf >, + #[ subform_entry( name = entry ) ] + pub entries : Vec< Entry >, + #[ subform_entry( name = source ) ] + pub sources : Vec< SourceFile >, + pub cargo_file : Option< CargoFile >, + } + + #[ derive( Debug, Default, Former ) ] + pub struct Plan + { + #[ subform_scalar ] + pub program : Program, + pub calls : Vec< Call >, + } + + #[ derive( Debug, Default ) ] + pub struct Call + { + pub action : Action, + pub current_path : Option< PathBuf >, + pub args : Vec< String >, + pub index_of_entry : i32, + } + + #[ derive( Debug, Default ) ] + pub enum Action + { + #[ default ] + Run, + Build, + Test, + } + + #[ derive( Debug, Default ) ] + pub enum EntryType + { + #[ default ] + Bin, + Lib, + Test, } #[ derive( Debug, Default, Former ) ] @@ -26,31 +67,17 @@ pub( crate ) mod private } #[ derive( Debug, Default, Former ) ] - pub struct CargoFile + pub struct SourceFile { file_path : PathBuf, data : GetData, } #[ derive( Debug, Default, Former ) ] - // #[ debug ] - pub struct Program - { - write_path : Option< PathBuf >, - read_path : Option< PathBuf >, - #[ subform_entry( name = entry ) ] - entries : Vec< Entry >, - #[ subform_entry( name = source ) ] - sources : Vec< SourceFile >, - cargo_file : Option< CargoFile >, - } - - #[ derive( Debug, Default, Former ) ] - pub struct ProgramPlan + pub struct CargoFile { - // #[ embed ] - program : Program, - calls : Vec< ProgramCall >, + file_path : PathBuf, + data : GetData, } #[ derive( Debug ) ] @@ -62,44 +89,74 @@ pub( crate ) mod private FromString( String ), } - impl Default for GetData + impl From< &'static str > for GetData { - fn default() -> Self + #[ inline ] + fn from( src : &'static str ) -> Self { - GetData::FromStr( "" ) + Self::FromStr( src ) } } - #[ derive( Debug, Default ) ] - pub struct ProgramCall + impl From< &'static [ u8 ] > for GetData { - action : ProgramAction, - current_path : Option< PathBuf >, - args : Vec< String >, - index_of_entry : i32, + #[ inline ] + fn from( src : &'static [ u8 ] ) -> Self + { + Self::FromBin( src ) + } } - #[ derive( Debug, Default ) ] - pub enum ProgramAction - { - #[ default ] - Run, - Build, - Test, - } +// impl< IntoVariant > From< IntoVariant > for GetData +// where +// IntoVariant : Into< PathBuf >, +// { +// #[ inline ] +// fn from( src : IntoVariant ) -> Self +// { +// Self::FromStr( core::convert::Into::into( src ) ) +// } +// } +// +// impl< IntoVariant > From< IntoVariant > for GetData +// where +// IntoVariant : Into< String >, +// { +// #[ inline ] +// fn from( src : IntoVariant ) -> Self +// { +// Self::FromStr( core::convert::Into::into( src ) ) +// } +// } - #[ derive( Debug, Default ) ] - pub enum EntryType + impl Default for GetData { - #[ default ] - Bin, - Lib, - Test, + fn default() -> Self + { + GetData::FromStr( "" ) + } } } crate::mod_interface! { - // protected use run; + + exposed use + { + Program, + }; + + protected use + { + Plan, + Call, + Action, + EntryType, + Entry, + SourceFile, + CargoFile, + GetData, + }; + } diff --git a/module/core/program_tools/tests/inc/basic.rs b/module/core/program_tools/tests/inc/basic.rs index 60c9a81cfb..9f9aa8daea 100644 --- a/module/core/program_tools/tests/inc/basic.rs +++ b/module/core/program_tools/tests/inc/basic.rs @@ -4,4 +4,13 @@ use super::*; #[ test ] fn basic() { + use the_module::program; + + let _plan = program::Plan::former() + .program() + // .source().file_path( "main.rs" ).data( program::GetData::FromStr( "fn main() { println( \"hello!\" ) }" ) ).end() + .source().file_path( "main.rs" ).data( "fn main() { println( \"hello!\" ) }" ).end() + .end() + .end(); + }