8#include "storm-config.h" 
   18TEST(SparseStateRewardParserTest, NonExistingFile) {
 
   21                              storm::exceptions::FileIoException);
 
 
   24double round(
double val, 
int precision) {
 
   26    s << std::setprecision(precision) << std::setiosflags(std::ios_base::fixed) << val;
 
 
   31TEST(SparseStateRewardParserTest, BasicParsing) {
 
   33    std::vector<double> result =
 
   37    for (
int i = 0; i < 100; i++) {
 
   38        ASSERT_EQ(std::round(2 * i + 15 / 13 * i * i - 1.5 / (i + 0.1) + 15.7), std::round(result[i]));
 
 
   42TEST(SparseStateRewardParserTest, Whitespaces) {
 
   44    std::vector<double> result =
 
   48    for (
int i = 0; i < 100; i++) {
 
   49        ASSERT_EQ(std::round(2 * i + 15 / 13 * i * i - 1.5 / (i + 0.1) + 15.7), std::round(result[i]));
 
 
   53TEST(SparseStateRewardParserTest, DoubledLines) {
 
   57        storm::exceptions::WrongFormatException);
 
   62        storm::exceptions::WrongFormatException);
 
 
   65TEST(SparseStateRewardParserTest, RewardForNonExistentState) {
 
   69        storm::exceptions::OutOfRangeException);
 
 
double round(double val, int precision)
TEST(SparseStateRewardParserTest, NonExistingFile)
A class providing the functionality to parse a the state rewards of a model.
static std::vector< ValueType > parseSparseStateReward(uint_fast64_t stateCount, std::string const &filename)
Reads a state reward file and puts the result in a state reward vector.
#define STORM_SILENT_ASSERT_THROW(statement, expected_exception)