blob: 6b9b4b9696557601d83881a1e94251ba256a93be [file] [log] [blame] [view]
David Neto750120f2023-09-19 21:15:38 +00001# Testing Tint
2
3Tint has multiple levels of testing:
4
5* Unit tests, using the Googletest framework. These are the lowest level tests,
6 comprehensively checking functionality of internal functions and classes.
7 The test code is inside the Tint source tree in files with names ending in
8 `_test.cc`
David Netoc8ccd3d2024-05-02 18:32:17 +00009
10 To run them, build the `tint_unittests` target to produce the `tint_unittests`
11 executable, and then run the executable.
12
13 The `tint_unittests` executable supports all the standard Googletest command
14 line options, e.g. using filters to run only a subset of the tests.
15 See [Running Test Programs: Advanced
16 Options](https://google.github.io/googletest/advanced.html#running-test-programs-advanced-options)
17
David Neto750120f2023-09-19 21:15:38 +000018* End-to-end tests. These test the whole compiler flow, translating source
19 shaders to output shaders in various languages, and optionally checking
Jiawei Shaob9feb092024-01-10 11:19:09 +000020 the text of diagnostics. See [Tint end-to-end tests](end-to-end-tests.md).
David Netoc8ccd3d2024-05-02 18:32:17 +000021
David Neto750120f2023-09-19 21:15:38 +000022* WebGPU Conformance Test Suite (CTS). The WebGPU CTS has both validation and
23 execution tests, in the `webgpu:shader` hierarchy.
24 See https://github.com/gpuweb/cts
25 All test can be run in Chrome, and many tests can be run via `dawn.node`,
26 the [Dawn bindings for NodeJS](../../src/dawn/node/README.md).