This is a quick header-only extension that provides definitions for google test for testing files generated by code against expected output gold files.
- googletest
- dtl diff template library
- Place the
goldtestfolder in your include path. - Run your code that generates your test file.
- Use the macro
EXPECT_GOLD_FILE_MATCH(actual_file_location, gold_file_location)to run the test.
Note that the current state of this will not delete generated test files or move
gold files to an appropriate location. See the CMakeLists.txt in the example and testing
folder for an example of how to recursively find and move gold files to a particular
directory for testing.