Skip to content

Commit

Permalink
Fix header usage functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
red0124 committed Feb 25, 2024
1 parent 05f87bc commit 110ee84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/ss/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class parser {
reader_.next_line_converter_.set_column_mapping(column_mappings,
header_.size());

if (line() == 1) {
if (line() == 0) {
ignore_next();
}
}
Expand Down
8 changes: 6 additions & 2 deletions test/test_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,17 @@ struct unique_file_name {

unique_file_name(const std::string& test) {
do {
name = "random_file_test_" + test + "_" + std::to_string(i++) +
name = "ssp_test_" + test + "_" + std::to_string(i++) +
"_" + time_now_rand() + "_file.csv";
} while (std::filesystem::exists(name));
}

~unique_file_name() {
std::filesystem::remove(name);
try {
std::filesystem::remove(name);
} catch (const std::filesystem::filesystem_error& e) {
std::cerr << e.what() << std::endl;
}
}
};

Expand Down

0 comments on commit 110ee84

Please sign in to comment.