MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / compare

Function compare

tests/support/util.cpp:24–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23namespace util {
24bool compare(const std::string &file1, const std::string &file2) {
25 std::stringstream ss1, ss2;
26 std::ifstream if1(file1.c_str(), std::ios::binary), if2(file2.c_str(), std::ios::binary);
27 ss1 << if1.rdbuf();
28 ss2 << if2.rdbuf();
29 return ss1.str() == ss2.str();
30}
31
32int write_rand(const char *path) {
33 int value = rand();

Callers 1

TEST_FFunction · 0.50

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.40