You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test-suite.md
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ title: The Rust Test Suite · The Rust Programming Language
5
5
6
6
# The Rust test suite
7
7
8
+
## THIS DOCUMENT IS DEPRECATED. PLEASE READ src/test/COMPILER_TESTS.md IN THE COMPILER REPO INSTEAD
9
+
8
10
The rust test suite has several sets of tests for different purposes. As the compiler is built over multiple stages, and with varying host and target combinations, debugging and profiling settings, the tests can be run in many different ways.
9
11
10
12
## Recipes
@@ -120,7 +122,7 @@ fn main() {
120
122
```
121
123
122
124
In fact, this test would fail, because there are two errors: the type
123
-
mismatch and the undefined variable `b`.
125
+
mismatch and the undefined variable `b`.
124
126
125
127
Sometimes it is not possible or not convenient to place the `//~`
126
128
comment on precisely the line where the error occurs. For those cases,
@@ -143,7 +145,7 @@ fn main() {
143
145
The older technique for specifying error messages was to use an
144
146
`error-pattern` directive. These directives are placed at the top of
145
147
the file and each message found in an `error-pattern` directive must
146
-
appear in the output.
148
+
appear in the output.
147
149
148
150
Using error comments is preferred, however, because it is a more
149
151
thorough test:
@@ -153,7 +155,7 @@ thorough test:
153
155
154
156
### Multi-crate testing
155
157
156
-
Sometimes it is useful to write tests that make use of more than one crate. We have limited support for this scenario. Basically, you can write and add modules into the `src/test/auxiliary` directory. These files are not built nor tested directly. Instead, you write a main test in one of the other directories (`run-pass`, `compile-fail`, etc) and add a `aux-build` directive at the head of the main test. When running the main test, the test framework will build the files it is directed to build from the auxiliary directory. These builds *must* succeed or the test will fail. You can then include `use` and `import` commands to make use of the byproducts from these builds as you wish.
158
+
Sometimes it is useful to write tests that make use of more than one crate. We have limited support for this scenario. Basically, you can write and add modules into the `src/test/auxiliary` directory. These files are not built nor tested directly. Instead, you write a main test in one of the other directories (`run-pass`, `compile-fail`, etc) and add a `aux-build` directive at the head of the main test. When running the main test, the test framework will build the files it is directed to build from the auxiliary directory. These builds *must* succeed or the test will fail. You can then include `use` and `import` commands to make use of the byproducts from these builds as you wish.
0 commit comments