| 159 | } |
| 160 | |
| 161 | static void print_string_comparison(const std::string &s1, |
| 162 | const std::string &s2, |
| 163 | const std::string &prefix, |
| 164 | const std::string &s1name, |
| 165 | const std::string &s2name) { |
| 166 | for(size_t jj = 0; jj < (std::max)(s1.size(), s2.size()); ++jj) { |
| 167 | if(jj >= s1.size()) { |
| 168 | std::cout << prefix << ":" << s1name << "[" << jj << "] = [empty], " << s2name << "[" << jj |
| 169 | << "]=" << static_cast<int>(s2[jj]) << '\n'; |
| 170 | } else if(jj >= s2.size()) { |
| 171 | std::cout << prefix << ":" << s1name << "[" << jj << "]=" << static_cast<int>(s1[jj]) << ", " << s2name |
| 172 | << "[" << jj << "]=[empty] \n"; |
| 173 | } else if(s1[jj] != s2[jj]) { |
| 174 | std::cout << "-->" << prefix << ":" << s1name << "[" << jj << "]=" << static_cast<int>(s1[jj]) << ", " |
| 175 | << s2name << "[" << jj << "]=" << static_cast<int>(s2[jj]) << '\n'; |
| 176 | } else { |
| 177 | std::cout << prefix << ":" << s1name << "[" << jj << "]=" << static_cast<int>(s1[jj]) << '\n'; |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | static constexpr double keydub = 6262542.2622; |
| 183 | bool FuzzApp::compare(const FuzzApp &other, bool print_error) const { |