| 46 | } |
| 47 | |
| 48 | static units::energy parse_energy_quantity( const std::string &json ) |
| 49 | { |
| 50 | std::istringstream buffer( json ); |
| 51 | JsonIn jsin( buffer ); |
| 52 | return read_from_json_string<units::energy>( jsin.get_value(), units::energy_units ); |
| 53 | } |
| 54 | |
| 55 | TEST_CASE( "energy parsing from JSON", "[units]" ) |
| 56 | { |