John Kessenich 1ea1b13f38 Testing: Add new tests, and new ways of testing, for floating-point. 6 tahun lalu
..
AST.FromFile.cpp 1ea1b13f38 Testing: Add new tests, and new ways of testing, for floating-point. 6 tahun lalu
BuiltInResource.FromFile.cpp 1d3a966106 Gtests can be run on another source tree 8 tahun lalu
CMakeLists.txt 57a2b22d34 Update CMakeLists.txt 7 tahun lalu
Config.FromFile.cpp 2d9973de0e Tests: specExamples.vert is used twice, it needs two different output names. 6 tahun lalu
HexFloat.cpp 486d9e44e0 Update HexFloat tests to use non-enum class enum values 8 tahun lalu
Hlsl.FromFile.cpp c59916710e HLSL: allow self-type cast (as no-op passthrough) 6 tahun lalu
Initializer.h 0a6fb85494 Infrastructure: Make shared symbol-table cache complete, delete work around. 8 tahun lalu
Link.FromFile.Vk.cpp 5a867acad5 Linker: Fix #1329: correctly merge unsized arrays, and fix link tests. 6 tahun lalu
Link.FromFile.cpp 6a60c2f9ea Linker: Walk the call graph to report an error on missing bodies. 7 tahun lalu
Pp.FromFile.cpp 1d3a966106 Gtests can be run on another source tree 8 tahun lalu
README.md 414eb60482 Link in Google Test framework. 8 tahun lalu
Remap.FromFile.cpp 65c2eed65d Remapper: handle embedded opcode in OpSpecConstantOp 7 tahun lalu
Settings.cpp 1d3a966106 Gtests can be run on another source tree 8 tahun lalu
Settings.h 1d3a966106 Gtests can be run on another source tree 8 tahun lalu
Spv.FromFile.cpp b92ce60fc7 GLSL/SPV: Fix #1310: don't create unnecessary integer matrices. 6 tahun lalu
TestFixture.cpp fb03a55e0f Only print legalization warning if optimizer disabled 6 tahun lalu
TestFixture.h fb03a55e0f Only print legalization warning if optimizer disabled 6 tahun lalu
main.cpp 66011cb2c2 SPV: Implement Vulkan 1.1 features and extensions. 6 tahun lalu

README.md

Glslang Tests based on the Google Test Framework

This directory contains Google Test based test fixture and test cases for glslang.

Apart from typical unit tests, necessary utility methods are added into the GlslangTests fixture to provide the ability to do file-based integration tests. Various *.FromFile.cpp files lists names of files containing input shader code in the Test/ directory. Utility methods will load the input shader source, compile them, and compare with the corresponding expected output in the Test/baseResults/ directory.

How to run the tests

Please make sure you have a copy of Google Test checked out under the External directory before building. After building, just run the ctest command or the gtests/glslangtests binary in your build directory.

The gtests/glslangtests binary also provides an --update-mode command line option, which, if supplied, will overwrite the golden files under the Test/baseResults/ directory with real output from that invocation. This serves as an easy way to update golden files.