Skip to content

Commit ea600fa

Browse files
authored
Document how to ignore tests (#8049)
* Document how to ignore tests * Use `DISABLE_TEST` instead of `IGNORE_TEST`
1 parent e0b9125 commit ea600fa

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tools/slang-test/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ Available APIs:
8585

8686
Tests are identified by a special comment at the start of the test file: `//TEST:<type>:`
8787

88+
To ignore a test, use `//DISABLE_TEST` instead of `//TEST`.
89+
8890
Available test types:
8991
- `SIMPLE`: Runs the slangc compiler with specified options after the command
9092
- `REFLECTION`: Runs slang-reflection-test with the options specified after the command
@@ -103,7 +105,21 @@ Deprecated test types (do not create new tests of these kinds, and we need to sl
103105
- `CROSS_COMPILE`: Compiles using GLSL pass-through and through Slang, then compares the outputs
104106

105107
## Unit Tests
106-
In addition to the above test tools, there are also `slang-unit-test-tool` and `gfx-unit-test-tool`, which are invoked as in the following examples.
108+
In addition to the above test tools, there are also `slang-unit-test-tool` and `gfx-unit-test-tool`, which are invoked as in the following examples; but note that the unit tests do get run as part of `slang-test` as well.
109+
110+
To ignore a unit test, use the `SLANG_IGNORE_TEST` macro:
111+
112+
```cpp
113+
SLANG_UNIT_TEST(foo)
114+
{
115+
if (condition)
116+
{
117+
SLANG_IGNORE_TEST
118+
}
119+
120+
// ...
121+
}
122+
```
107123
108124
### slang-unit-test-tool
109125
```bash

0 commit comments

Comments
 (0)