Skip to content

Commit 8e89118

Browse files
committed
Broken test
1 parent a9d89f4 commit 8e89118

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_data_reader.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class TempFile {
1010
public:
1111
std::string path;
1212

13-
TempFile(const std::string& content) {
14-
path = "test_data_reader_temp.txt";
13+
TempFile(const std::string& content, const std::string& extension = ".txt") {
14+
path = "test_data_reader_temp" + extension;
1515
std::ofstream f(path);
1616
f << content;
1717
f.close();
@@ -44,10 +44,11 @@ void test_process_csv_file_basic() {
4444
TempFile file(
4545
"sensor_id,value\n"
4646
"s1,22.5\n"
47-
"s2,23.0\n"
47+
"s2,23.0\n",
48+
".csv"
4849
);
4950

50-
DataReader reader(0, 0, 0, "csv");
51+
DataReader reader(0, 0, 0, "json"); // inputFormat ignored for files
5152
int count = 0;
5253

5354
reader.processFile(file.path, [&](const std::map<std::string, std::string>& reading, int, const std::string&) {

0 commit comments

Comments
 (0)