MCPcopy Create free account
hub / github.com/PDAL/PDAL / diff_text_files

Function diff_text_files

test/unit/Support.cpp:114–127  ·  view source on GitHub ↗

do a comparison by line of two (text) files, ignoring CRLF differences

Source from the content-addressed store, hash-verified

112
113// do a comparison by line of two (text) files, ignoring CRLF differences
114uint32_t diff_text_files(const std::string& file1, const std::string& file2, int32_t ignoreLine1)
115{
116 if (!Utils::fileExists(file1) || !Utils::fileExists(file2))
117 return (std::numeric_limits<uint32_t>::max)();
118
119 std::istream* str1 = Utils::openFile(file1, false);
120 std::istream* str2 = Utils::openFile(file2, false);
121
122 int32_t diffs = diff_text_files(*str1, *str2, ignoreLine1);
123
124 Utils::closeFile(str1);
125 Utils::closeFile(str2);
126 return diffs;
127}
128
129uint32_t diff_text_files(std::istream& str1, std::istream& str2, int32_t ignoreLine1)
130{

Callers 2

compare_text_filesFunction · 0.85
TESTFunction · 0.85

Calls 8

removeFunction · 0.85
fileExistsFunction · 0.50
openFileFunction · 0.50
closeFileFunction · 0.50
eofMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 1

TESTFunction · 0.68