Skip to content
Snippets Groups Projects
Commit 01e28d80 authored by ilor's avatar ilor
Browse files

fix line no handling in data driven tests

parent 0b8578f7
Branches
No related merge requests found
......@@ -47,7 +47,9 @@ void test_one_item_actual(const compare_test& c)
std::string tagset_name = "kipi";
std::string sentence_filename;
std::string line;
int line_no = 0;
while (ifs_in.good() && line != "---") {
++line_no;
std::getline(ifs_in, line);
std::vector<std::string> fields;
boost::algorithm::split(fields, line, boost::is_any_of(separators));
......@@ -71,7 +73,6 @@ void test_one_item_actual(const compare_test& c)
std::string operator_string, expected_output;
int line_no = 0;
while (ifs_in.good()) {
++line_no;
std::getline(ifs_in, line);
......@@ -97,8 +98,8 @@ void test_one_item_actual(const compare_test& c)
}
expected_output = "";
operator_string = "";
++line_no;
while (ifs_in.good() && line != "---" && line != "") {
++line_no;
std::getline(ifs_in, line);
std::vector<std::string> fields;
boost::algorithm::split(fields, line, boost::is_any_of(separators));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment