Skip to content

Commit

Permalink
Merge pull request #2485 from Dr15Jones/avoidPrecisionProblemInTest
Browse files Browse the repository at this point in the history
Misc fixes -- Ignore minor precision differences in test.
  • Loading branch information
ktf committed Feb 15, 2014
2 parents 0fd9f24 + ed2682a commit 899d063
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FWCore/Integration/test/ProducerWithPSetDesc.cc
Expand Up @@ -104,7 +104,7 @@ namespace edmtest {
// format is 16 instead of 17.
// assert(ps.getParameter<double>("doublev1") == std::numeric_limits<double>::min());
assert(ps.getUntrackedParameter<double>("doublev2") == 0.0);
assert(ps.getUntrackedParameter<double>("doublev3") == 0.3);
assert(fabs(ps.getUntrackedParameter<double>("doublev3") - 0.3)< 0.0000001);

std::vector<double> vdouble;
vdouble = ps.getParameter<std::vector<double> >("vdoublev1");
Expand All @@ -125,7 +125,7 @@ namespace edmtest {
assert(vdouble[0] == 1e+300);
assert(vdouble[1] == 0.0);
assert(vdouble[2] == 11.0);
assert(vdouble[3] == 0.3);
assert(fabs(vdouble[3] - 0.3)< 0.0000001);

assert(ps.getParameter<bool>("boolv1") == true);
assert(ps.getParameter<bool>("boolv2") == false);
Expand Down

0 comments on commit 899d063

Please sign in to comment.