ReSharper Platform SDK
 
Because ReSharper Platform SDK undefined is still in development, this documentation may not be entirely accurate and is subject to change.

Gold Files

Last modified: 04 July 2023

ReSharper's test framework typically takes an input file, adds it as source file to an in-memory project, runs a process on it, such as inspections or code completion, and records the output in a temporary text file. This .tmp file is then compared to a .gold file, which contains the expected output. If they match, the test passes. If they don't, the test fails.

The input file typically lives in the same folder under the test\data folder as the .gold file. The input file and the gold file should both be committed to source control. The .tmp file should not be committed, as it represents a failing test.

The contents of the gold file depends very much on the test. For example, gold files for code completion tests will be a list of items in the code completion list, while inspections will be a copy of the source file annotated with location and text of highlights. Details of the contents of gold files can be found throughout this guide, in the specific sections on testing a particular feature.