Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit b85df44a authored by snuverink_j's avatar snuverink_j
Browse files

fix opt-pilot tests failing after using OPAL's SDDS parser by updating to an...

fix opt-pilot tests failing after using OPAL's SDDS parser by updating to an SDDS stat file from recent OPAL version
parent 50c29ed3
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ namespace { ...@@ -43,7 +43,7 @@ namespace {
std::string s = "energy"; std::string s = "energy";
sddsr->getValue(1, s, energy); sddsr->getValue(1, s, energy);
double expected = 2.220252349855340e-01; double expected = 7.159841726652937e+01;
ASSERT_DOUBLE_EQ(expected, energy); ASSERT_DOUBLE_EQ(expected, energy);
} }
...@@ -53,23 +53,23 @@ namespace { ...@@ -53,23 +53,23 @@ namespace {
std::string s = "s"; std::string s = "s";
sddsr->getValue(-1, s, position); sddsr->getValue(-1, s, position);
double expected = 4.247573354842603e-03; double expected = 1.097273618871144e+00;
ASSERT_DOUBLE_EQ(expected, position); ASSERT_DOUBLE_EQ(expected, position);
} }
TEST_F(SDDSParserTest, InterpolateRms_x) { TEST_F(SDDSParserTest, InterpolateRms_x) {
double spos = 4.0e-03; double spos = 1;
double rmsx_interp = 0.0; double rmsx_interp = 0.0;
EXPECT_NO_THROW({ EXPECT_NO_THROW({
sddsr->getInterpolatedValue(spos, "rms_x", rmsx_interp); sddsr->getInterpolatedValue(spos, "rms_x", rmsx_interp);
}); });
double spos_before = 3.786226707177705e-03; double spos_before = 7.314126542367660e-01;
double spos_after = 4.015012129060398e-03; double spos_after = 1.097273618871144e+00;
double rmsx_before = 3.147090549966750e-04; double rmsx_before = 1.739826974864265e-02;
double rmsx_after = 3.166390884805550e-04; double rmsx_after = 1.154446652697715e-02;
double expected = rmsx_before + (spos - spos_before) * (rmsx_after - rmsx_before) / (spos_after - spos_before); double expected = rmsx_before + (spos - spos_before) * (rmsx_after - rmsx_before) / (spos_after - spos_before);
......
...@@ -48,9 +48,9 @@ namespace { ...@@ -48,9 +48,9 @@ namespace {
TEST_F(SumErrSqExpressionTest, EvaluateSumErrSqExpression) { TEST_F(SumErrSqExpressionTest, EvaluateSumErrSqExpression) {
variableDictionary_t vars; variableDictionary_t vars;
double expected = (3.087242557177229e-04*3.087242557177229e-04 + double expected = (1.893993852447673e-02*1.893993852447673e-02 +
3.127445619624299e-04*3.127445619624299e-04 + 1.739826974864265e-02*1.739826974864265e-02 +
3.185324887508158e-04*3.185324887508158e-04) / 3.0; 1.154446652697715e-02*1.154446652697715e-02) / 3.0;
expected = sqrt(expected); expected = sqrt(expected);
functionDictionary_t funcs; functionDictionary_t funcs;
......
0.003126 0.0 0.36555 0.0
0.003561 0.0 0.73141 0.0
0.004245 0.0 1.09727 0.0
This diff is collapsed.
  • Developer

    The file test.stat had two errors:

    1. according to the SDDS manual the &data ... &end has to have the attribute no_row_counts
    2. the type of the parameter processors isn't long but string ("Cores used 1")

    The error messages of Opals "native" SDDS parser could definitely be better...

    Edited by kraus
  • kraus @kraus

    mentioned in commit d0933692

    ·

    mentioned in commit d0933692

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment