You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
474 B
23 lines
474 B
#include "gtest/gtest.h"
|
|
|
|
#include "Eigen/Sparse"
|
|
#include "src/exceptions/invalid_argument.h"
|
|
#include "boost/integer/integer_mask.hpp"
|
|
#include <vector>
|
|
|
|
#include "reward/reward_model.h"
|
|
|
|
TEST(RewardModelTest, ReadWriteTest) {
|
|
// 50 entries
|
|
mrmc::reward::RewardModel<std::vector, double> rm(50, 0.0);
|
|
|
|
double values[50];
|
|
for (int i = 0; i < 50; ++i) {
|
|
values[i] = 1.0 + i;
|
|
ASSERT_TRUE(rm.setReward(i, values[i]));
|
|
|
|
ASSERT_EQ(rm.getReward(i), values[i]);
|
|
}
|
|
|
|
}
|
|
|