File: README.md

package info (click to toggle)
spirv-tools 2025.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 28,588 kB
  • sloc: cpp: 470,407; javascript: 5,893; python: 3,326; ansic: 488; sh: 450; ruby: 88; makefile: 18; lisp: 9
file content (17 lines) | stat: -rw-r--r-- 989 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Diff tests

This directory contains files used to ensure correctness of the `spirv-diff` implementation.  The
`generate_tests.py` script takes `name_src.spvasm` and `name_dst.spvasm` (for each `name`) and
produces unit test files in the form of `name_autogen.cpp`.

The unit test files test the diff between the src and dst inputs, as well as between debug-stripped
versions of those.  Additionally, based on the `{variant}_TESTS` lists defined in
`generate_tests.py`, extra unit tests are added to exercise different options of spirv-diff.

New tests are added simply by placing a new `name_src.spvasm` and `name_dst.spvasm` pair in this
directory and running `generate_tests.py`.  Note that this script needs the path to the spirv-diff
executable that is built.

The `generate_tests.py` script additionally expects `name_src.spvasm` to include a heading where the
purpose of the test is explained.  This heading is parsed as a block of lines starting with `;;` at
the top of the file.