Changeset 351


Ignore:
Timestamp:
Jun 8, 2005, 9:36:05 PM (16 years ago)
Author:
Peter
Message:

testing that .5 is accepted in is_float

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/utility/utility.h

    r341 r351  
    2424  /// @return true if string is a number
    2525  ///
    26   /// @todo Make sure all C/C++ style floats are accepted, i.e. .5
    27   /// should be accepted.
    28   ///
    2926  bool is_float(const std::string&);
    3027
  • trunk/test/data/read_to_test.data

    r269 r351  
    335 12.3
    446 1.23e-6
     57 .5
  • trunk/test/stl_utility_test.cc

    r301 r351  
    3838    ok=false;
    3939  }
     40
     41  utility::read_to_double(is, vec2);
     42  if (vec2.size()-2){
     43    ok=false;
     44  }
     45  else if (vec2[1]!=0.5)
     46    ok=false;
     47 
     48
    4049  if (ok)
    4150    return 0;
Note: See TracChangeset for help on using the changeset viewer.