Corrade::TestSuite::Compare::File class

Pseudo-type for comparing file contents.

Prints the length of both files (if they are different) and prints the value and position of the first different character in both files. Filenames are expected to be in UTF-8. Example usage:

CORRADE_COMPARE_AS("actual.txt", "expected.txt", TestSuite::Compare::File);

If the files have the same path prefix, you can use CORRADE_COMPARE_WITH() and pass the prefix to the constructor:

CORRADE_COMPARE_WITH("actual.txt", "expected.txt",

See Comparing with pseudo-types and Passing parameters to comparators for more information.

Constructors, destructors, conversion operators

File(const std::string& pathPrefix = {}) explicit

Function documentation

Corrade::TestSuite::Compare::File::File(const std::string& pathPrefix = {}) explicit


pathPrefix Path prefix common for both files

See class documentation for more information.