File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/doc/contrib/src/tests Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ stdout and stderr output against the expected output.
29
29
30
30
Generally, a functional test will be placed in ` tests/testsuite/<command>.rs ` and will look roughly like:
31
31
``` rust,ignore
32
- use cargo_test_support ::prelude::*;
32
+ use crate ::prelude::*;
33
33
use cargo_test_support::str;
34
34
use cargo_test_support::project;
35
35
@@ -123,7 +123,7 @@ Tests that need to do cross-compilation should include this at the top of the
123
123
test to disable it in scenarios where cross compilation isn't available:
124
124
125
125
``` rust,ignore
126
- if cargo_test_support ::cross_compile::disabled() {
126
+ if crate::utils ::cross_compile::disabled() {
127
127
return;
128
128
}
129
129
```
@@ -146,7 +146,7 @@ If the test needs to run the cross-compiled binary, then it should have
146
146
something like this to exit the test before doing so:
147
147
148
148
``` rust,ignore
149
- if cargo_test_support ::cross_compile::can_run_on_host() {
149
+ if crate::utils ::cross_compile::can_run_on_host() {
150
150
return;
151
151
}
152
152
```
@@ -165,10 +165,10 @@ mod <case>;
165
165
166
166
` tests/testsuite/<command>/<case>/mod.rs ` :
167
167
``` rust,ignore
168
+ use crate::prelude::*;
168
169
use cargo_test_support::compare::assert_ui;
169
170
use cargo_test_support::current_dir;
170
171
use cargo_test_support::file;
171
- use cargo_test_support::prelude::*;
172
172
use cargo_test_support::Project;
173
173
174
174
#[cargo_test]
You can’t perform that action at this time.
0 commit comments