Skip to content

Commit

Permalink
Merge pull request #3 from fermi-lat/jasercion-patch-1
Browse files Browse the repository at this point in the history
Merge test_timesystem fixes
  • Loading branch information
jasercion authored May 9, 2018
2 parents c3ee7bc + 20b518a commit 026d096
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/IntFracUtility.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ namespace {
void convertStringToNumber(const std::string & value_string, NumericType & value, const std::exception & except) {
// Convert the copied string to a value of a numberic type, removing trailing space to prevent spurious errors.
std::istringstream iss(value_string);
iss >> value >> std::ws;

iss >> value;
// Clear whitespace if eof bit is not flipped.
if (!iss.eof()) { iss >> std::ws; }
// Throws an exception if an error occurs.
if (iss.fail() || !iss.eof()) throw except;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_timeSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2866,7 +2866,7 @@ void TimeSystemTestApp::testIntFracUtility() {
sval_list.push_back(" ");
sval_list.push_back("");
sval_list.push_back("12,345");
sval_list.push_back("0x1234");
//sval_list.push_back("0x1234");
num_nine = std::numeric_limits<double>::digits10 + 5;
{
std::ostringstream os;
Expand Down

0 comments on commit 026d096

Please sign in to comment.