From 8c3e46c18ee550139f4a1032b649b3bde2841136 Mon Sep 17 00:00:00 2001 From: wandalen Date: Tue, 5 Nov 2024 18:39:54 +0200 Subject: [PATCH] test_tools : rid off cyclic dependcy wip --- module/core/collection_tools/src/lib.rs | 7 ++++--- module/core/collection_tools/tests/inc/basic.rs | 13 +++++++++++++ module/core/collection_tools/tests/inc/mod.rs | 1 + module/move/willbe/tests/inc/tool/graph_test.rs | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 module/core/collection_tools/tests/inc/basic.rs diff --git a/module/core/collection_tools/src/lib.rs b/module/core/collection_tools/src/lib.rs index 93721816ea..d7a403088f 100644 --- a/module/core/collection_tools/src/lib.rs +++ b/module/core/collection_tools/src/lib.rs @@ -37,13 +37,13 @@ pub use own::*; #[ allow( unused_imports ) ] pub mod own { - use super::*; + // use super::*; #[ doc( inline ) ] - pub use orphan::*; + pub use super::orphan::*; #[ doc( inline ) ] - pub use collection::own::*; + pub use super::collection::own::*; } @@ -88,6 +88,7 @@ pub mod prelude } +// pub use own::collection as xxx; // pub use hmap as xxx; // pub use own::HashMap as xxx; // pub fn x() diff --git a/module/core/collection_tools/tests/inc/basic.rs b/module/core/collection_tools/tests/inc/basic.rs new file mode 100644 index 0000000000..02fe3575a2 --- /dev/null +++ b/module/core/collection_tools/tests/inc/basic.rs @@ -0,0 +1,13 @@ +#[ allow( unused_imports ) ] +use super::*; + +#[ test ] +fn basic() +{ + + use the_module::own::*; + let _v : Vec< u32 > = collection::Vec::new(); + let _v : Vec< u32 > = the_module::collection::Vec::new(); + let _v : Vec< u32 > = the_module::own::collection::Vec::new(); + +} \ No newline at end of file diff --git a/module/core/collection_tools/tests/inc/mod.rs b/module/core/collection_tools/tests/inc/mod.rs index ddd10e261d..926dada32c 100644 --- a/module/core/collection_tools/tests/inc/mod.rs +++ b/module/core/collection_tools/tests/inc/mod.rs @@ -9,6 +9,7 @@ mod llist; mod vec; mod deque; +mod basic; mod components; // qqq : make subdirectory for each container -- done diff --git a/module/move/willbe/tests/inc/tool/graph_test.rs b/module/move/willbe/tests/inc/tool/graph_test.rs index 75a2b29db3..0ad57fa024 100644 --- a/module/move/willbe/tests/inc/tool/graph_test.rs +++ b/module/move/willbe/tests/inc/tool/graph_test.rs @@ -3,7 +3,7 @@ use super::*; // qqq : for Bohdan : bad. don't import the_module::* // use the_module::*; use the_module::graph::toposort; -use collection::HashMap; +use test_tools::collection::HashMap; use petgraph::Graph; use willbe::graph::topological_sort_with_grouping;