class
FilePseudo-type for comparing file contents.
Contents
Prints the length of both files (if they are different) and prints value and position of 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_
CORRADE_COMPARE_WITH("actual.txt", "expected.txt", TestSuite::Compare::File{"/common/prefix"});
See Comparing with pseudo-types and Passing parameters to comparators for more information.
Constructors, destructors, conversion operators
-
File(const std::
string& pathPrefix = {}) explicit - Constructor.
Function documentation
Corrade:: TestSuite:: Compare:: File:: File(const std:: string& pathPrefix = {}) explicit
Constructor.
Parameters | |
---|---|
pathPrefix | Path prefix common for both files |
See class documentation for more information.