Skip to content

Commit 416a071

Browse files
committed
Split test into test and test-unit
1 parent 4ab6c40 commit 416a071

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

text/0000-erfc-post-build-contexts.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,25 @@ frameworks are defined:
204204
name = "test"
205205
provider = { test = "1.0" }
206206
folders = ["tests"]
207+
lib = false
208+
209+
[[testing.frameworks]]
210+
name = "test-unit"
211+
provider = { test = "1.0" }
212+
folders = []
213+
lib = true
207214

208215
[[testing.frameworks]]
209216
name = "bench"
210217
provider = { ?? = "1.0" }
211218
folders = ["benches"]
219+
lib = true # could also be split into two
212220

213221
[[testing.frameworks]]
214222
name = "example"
215223
provider = { ?? = "1.0" }
216224
folders = ["examples"]
225+
lib = false
217226
```
218227

219228
Whereas having two frameworks of the same name is an error, if you define
@@ -234,11 +243,14 @@ customized:
234243

235244
```toml
236245
[testing.set.test]
237-
frameworks = [test, quickcheck, examples]
246+
frameworks = [test, test-unit, quickcheck, examples]
247+
248+
# Default set is [test, test-unit]
238249
```
239250

240251
This means that `cargo test` will, aside from doctests, run `cargo
241-
test --framework test`, `cargo test --framework quickcheck`, and `cargo test --framework examples`
252+
test --framework test`, `cargo test --framework test-unit`,
253+
`cargo test --framework quickcheck`, and `cargo test --framework examples`
242254
(and similar stuff for `cargo bench`). It is not possible to make `cargo
243255
test` _not_ run doctests. If both a framework and a set exists with a
244256
given name, the set takes precedence.

0 commit comments

Comments
 (0)