1# Diff tests 2 3This directory contains files used to ensure correctness of the `spirv-diff` implementation. The 4`generate_tests.py` script takes `name_src.spvasm` and `name_dst.spvasm` (for each `name`) and 5produces unit test files in the form of `name_autogen.cpp`. 6 7The unit test files test the diff between the src and dst inputs, as well as between debug-stripped 8versions of those. Additionally, based on the `{variant}_TESTS` lists defined in 9`generate_tests.py`, extra unit tests are added to exercise different options of spirv-diff. 10 11New tests are added simply by placing a new `name_src.spvasm` and `name_dst.spvasm` pair in this 12directory and running `generate_tests.py`. Note that this script needs the path to the spirv-diff 13executable that is built. 14 15The `generate_tests.py` script additionally expects `name_src.spvasm` to include a heading where the 16purpose of the test is explained. This heading is parsed as a block of lines starting with `;;` at 17the top of the file. 18