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
481 B

  1. #include "gtest/gtest.h"
  2. #include "Eigen/Sparse"
  3. #include "src/exceptions/InvalidArgumentException.h"
  4. #include "boost/integer/integer_mask.hpp"
  5. #include <vector>
  6. #include "reward/RewardModel.h"
  7. TEST(RewardModelTest, ReadWriteTest) {
  8. // 50 entries
  9. mrmc::reward::RewardModel<std::vector, double> rm(50, 0.0);
  10. double values[50];
  11. for (int i = 0; i < 50; ++i) {
  12. values[i] = 1.0 + i;
  13. ASSERT_TRUE(rm.setReward(i, values[i]));
  14. ASSERT_EQ(rm.getReward(i), values[i]);
  15. }
  16. }