Skip to content

Commit 821daf1

Browse files
committed
test_tools : rid of cyclic dependcy wip
1 parent 8c3e46c commit 821daf1

File tree

14 files changed

+42
-68
lines changed

14 files changed

+42
-68
lines changed

module/core/collection_tools/src/collection.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ pub mod own
4343
{
4444
use super::*;
4545

46-
#[ doc( inline ) ]
47-
pub use super::super::collection;
48-
4946
pub use super::super::collection::
5047
{
5148
btree_map,
@@ -83,19 +80,8 @@ pub mod exposed
8380
#[ doc( inline ) ]
8481
pub use prelude::*;
8582

86-
// #[ doc( inline ) ]
87-
// #[ cfg( any( feature = "use_alloc", all( feature = "collection_constructors", not( feature = "no_std" ) ) ) ) ]
88-
// pub use crate::
89-
// {
90-
// vec as dlist,
91-
// };
92-
93-
// #[ doc( inline ) ]
94-
// #[ cfg( any( feature = "use_alloc", all( feature = "collection_into_constructors", not( feature = "no_std" ) ) ) ) ]
95-
// pub use crate::
96-
// {
97-
// into_vec as into_dlist,
98-
// };
83+
#[ doc( inline ) ]
84+
pub use super::super::collection;
9985

10086
#[ doc( inline ) ]
10187
#[ cfg( any( feature = "use_alloc", all( feature = "collection_constructors", not( feature = "no_std" ) ) ) ) ]

module/core/collection_tools/tests/inc/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ mod llist;
99
mod vec;
1010
mod deque;
1111

12-
mod basic;
12+
mod namespace_test;
1313
mod components;
1414

1515
// qqq : make subdirectory for each container -- done
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
#[ allow( unused_imports ) ]
21
use super::*;
32

43
#[ test ]
5-
fn basic()
4+
fn exposed_main_namespace()
65
{
76

8-
use the_module::own::*;
9-
let _v : Vec< u32 > = collection::Vec::new();
107
let _v : Vec< u32 > = the_module::collection::Vec::new();
11-
let _v : Vec< u32 > = the_module::own::collection::Vec::new();
8+
let _v : Vec< u32 > = the_module::exposed::collection::Vec::new();
9+
use the_module::exposed::*;
10+
let _v : Vec< u32 > = collection::Vec::new();
1211

1312
}

module/core/collection_tools/tests/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// usual tests
1+
#![ allow( unused_imports ) ]
22

33
#[ path="../../../../module/step/meta/src/module/aggregating.rs" ]
44
mod aggregating;

module/core/error_tools/src/error/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ pub mod exposed
286286
#[ doc( inline ) ]
287287
pub use prelude::*;
288288

289+
// Expose itself.
290+
pub use super::super::error;
291+
289292
#[ doc( inline ) ]
290293
pub use private::
291294
{

module/core/error_tools/tests/inc/basic_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![ allow( deprecated ) ]
2-
#![ allow( unused_imports ) ]
2+
// #![ allow( unused_imports ) ]
33
use super::*;
44

55
//
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#[ allow( unused_imports ) ]
22
use super::*;
33

4-
mod assert_test;
54
mod basic_test;
5+
mod namespace_test;
6+
7+
mod assert_test;
68
#[ cfg( not( feature = "no_std" ) ) ]
79
mod err_with_test;
810
mod untyped_test;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use super::*;
2+
3+
#[ test ]
4+
fn exposed_main_namespace()
5+
{
6+
7+
the_module::error::debug_assert_id!( 1, 1 );
8+
the_module::exposed::error::debug_assert_id!( 1, 1 );
9+
use the_module::exposed::*;
10+
error::debug_assert_id!( 1, 1 );
11+
12+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
#![ allow( unused_imports ) ]
12

2-
#[ allow( unused_imports ) ]
33
use error_tools as the_module;
4-
#[ allow( unused_imports ) ]
54
use test_tools::exposed::*;
65

76
mod inc;

module/core/test_tools/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ pub mod own
128128
pub use
129129
{
130130
error_tools::orphan::*,
131+
collection_tools::orphan::*,
131132
// meta_tools::orphan::*,
132133
mem_tools::orphan::*,
133134
typing_tools::orphan::*,
134135
diagnostics_tools::orphan::*,
135-
collection_tools::orphan::*,
136136
};
137137

138138
}
@@ -169,11 +169,11 @@ pub mod exposed
169169
pub use
170170
{
171171
error_tools::exposed::*,
172+
collection_tools::exposed::*,
172173
// meta_tools::exposed::*,
173174
mem_tools::exposed::*,
174175
typing_tools::exposed::*,
175176
diagnostics_tools::exposed::*,
176-
collection_tools::exposed::*,
177177
};
178178

179179
}
@@ -192,11 +192,11 @@ pub mod prelude
192192
pub use
193193
{
194194
error_tools::prelude::*,
195+
collection_tools::prelude::*,
195196
// meta_tools::prelude::*,
196197
mem_tools::prelude::*,
197198
typing_tools::prelude::*,
198199
diagnostics_tools::prelude::*,
199-
collection_tools::prelude::*,
200200
};
201201

202202
}

0 commit comments

Comments
 (0)