Commit 6437a69
committed
Add Help Printing to XCTest executables
- Provides usage and examples on --help, -h, or and invalid option
- Examples are customized based on the tests contained in the executable
and the executable name
For example, for Foundation's TestFoundation:
```
> TestFoundation --invalid
Error: Invalid option "--invalid"
Usage: TestFoundation.exe [OPTION]
TestFoundation.exe [TESTCASE]
Run and report results of test cases.
With no OPTION or TESTCASE, runs all test cases.
-h, --help Print this help message
-l, --list-test List tests line by line to standard output
--dump-tests-json List tests in JSON to standard output
Examples:
Run a single test
> TestFoundation.exe TestFoundation.TestAffineTransform/test_BasicConstruction
Run all the tests in TestFoundation.TestAffineTransform
> TestFoundation.exe TestFoundation.TestAffineTransform
```1 parent b6d6776 commit 6437a69
File tree
2 files changed
+42
-4
lines changed- Sources/XCTest
- Private
- Public
2 files changed
+42
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
90 | 121 | | |
91 | 122 | | |
92 | 123 | | |
| |||
96 | 127 | | |
97 | 128 | | |
98 | 129 | | |
99 | | - | |
| 130 | + | |
100 | 131 | | |
101 | 132 | | |
0 commit comments