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
{{ message }}
Repository navigation
Commit a5ed75f
Browse filesBrowse the repository at this point in the historyBrowse files
docs: [test] discover, MCPP_RUNTIME_FILES, format-named runners, --toolchain on run/test/pack, and the runner emission contract (#634)
docs/04 section 2.17 and the defaults table; docs/08 where tests are, the
--toolchain axis and the files a test program carries to a device; docs/09 a
toolchain for one invocation; docs/30 one argv per runner name within a build
program; docs/41 what a runner receives and how a distributable is run. The
Chinese mirrors carry the same sections.
Copy file name to clipboardExpand all lines: docs/04-mcpp-toml.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1434,6 +1434,24 @@ do`.
1434
1434
1435
1435
Moved to [09 — Commands by Scenario](09-commands-by-scenario.md).
1436
1436
1437
+
### 2.17 `[test]` — Where Test Programs Are
1438
+
1439
+
```toml
1440
+
[test]
1441
+
discover = ["tests/**/*.cpp"] # the default
1442
+
```
1443
+
1444
+
| Key | Type | Meaning |
1445
+
|---|---|---|
1446
+
|`discover`| array of globs | every file a glob matches is one test program; a glob beginning with `!` removes the files it matches; `[]` discovers none |
1447
+
1448
+
The globs use the vocabulary of `[build] sources`. A test's name is its path
1449
+
relative to the fixed directory of the first glob that matched it, without the
1450
+
extension. Two files with one name are refused, naming both. A value that is not
1451
+
an array of non-empty strings is an error; any other key in `[test]` is a
1452
+
warning, and an error under `--strict`. [08 — Testing](08-testing.md) describes
1453
+
the test model.
1454
+
1437
1455
1438
1456
## 3. Worked Examples
1439
1457
@@ -1495,7 +1513,7 @@ kind = "bin"
1495
1513
| C standard |`c11`|`.c` files go through the C compiler automatically |
0 commit comments