Fix compile

This commit is contained in:
Jacob Dufault 2017-05-18 18:14:15 -07:00
parent 866faed4fc
commit 1d6477c3e9

View File

@ -22,24 +22,6 @@ std::string ToString(const rapidjson::Document& document) {
return buffer.GetString(); return buffer.GetString();
} }
std::vector<std::string> SplitString(const std::string& str, const std::string& delimiter) {
// http://stackoverflow.com/a/13172514
std::vector<std::string> strings;
std::string::size_type pos = 0;
std::string::size_type prev = 0;
while ((pos = str.find(delimiter, prev)) != std::string::npos) {
strings.push_back(str.substr(prev, pos - prev));
prev = pos + 1;
}
// To get the last substring (or only, if delimiter is not found)
strings.push_back(str.substr(prev));
return strings;
}
void DiffDocuments(std::string path, std::string path_section, rapidjson::Document& expected, rapidjson::Document& actual) { void DiffDocuments(std::string path, std::string path_section, rapidjson::Document& expected, rapidjson::Document& actual) {
std::string joined_actual_output = ToString(actual); std::string joined_actual_output = ToString(actual);
std::vector<std::string> actual_output = SplitString(joined_actual_output, "\n"); std::vector<std::string> actual_output = SplitString(joined_actual_output, "\n");
@ -149,6 +131,7 @@ void RunTests() {
"-IC:/Users/jacob/Desktop/superindex/indexer/src" "-IC:/Users/jacob/Desktop/superindex/indexer/src"
}, },
"", nullopt, "", nullopt,
nullptr,
false /*dump_ast*/); false /*dump_ast*/);
#if false #if false