Commit 0ba48c58 authored by snuverink_j's avatar snuverink_j
Browse files

add sdds parser test on last line; fix #153 and new parser test

parent 25ea2b89
......@@ -47,6 +47,16 @@ namespace {
ASSERT_DOUBLE_EQ(expected, energy);
}
TEST_F(SDDSParserTest, ReadLastPosition) {
double position = 0.0;
std::string s = "s";
sddsr->getValue(-1, s, position);
double expected = 4.247573354842603e-03;
ASSERT_DOUBLE_EQ(expected, position);
}
TEST_F(SDDSParserTest, InterpolateRms_x) {
double spos = 4.0e-03;
......
......@@ -90,6 +90,7 @@ void SDDSReader::parseFile() {
}
std::getline(sdds, line, '\n');
tmp.push_back(line);
if (tmp[0].empty()) continue; // skip empty lines
columns_m.push_back(tmp);
}
}
......
Markdown is supported
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