message: Fixed test_RSIVisitor() to use IBM file
diff: @@ -819,30 +819,30 @@ static void test_RSIVisitor() {
  std::cout << "\nTesting RSIVisitor{ } ..." << std::endl;
  - const size_t item_cnt = 32;
  - MyDataFrame df;
  - RandGenParams<double> p;
  + typedef StdDataFrame<std::string> StrDataFrame;
  - p.mean = 5.6;
  - p.std = 0.5;
  - p.seed = 123;
  - p.min_value = 0;
  - p.max_value = 8;
  + StrDataFrame df;
  - df.load_data(MyDataFrame::gen_sequence_index(0, item_cnt, 1),
  - std::make_pair("normal",
  - gen_normal_dist<double>(item_cnt, p)));
  + try {
  + df.read("data/SHORT_IBM.csv", io_format::csv2);
  - RSIVisitor<double> rsi(return_policy::percentage);
  - const auto rsi_result =
  - df.single_act_visit<double>("normal", rsi).get_result();
  - std::vector<double> result {
  - 61.7415, 60.4834, 61.9366, 59.6913, 57.6219, 60.7955, 59.3452, 59.975,
  - 58.261, 52.4888, 54.3424, 55.912, 54.6126, 54.3072, 52.3504, 56.7229,
  - 52.4376, 51.8158 };
  + RSIVisitor<double, std::string> rsi(return_policy::percentage);
  - for (size_t idx = 0; idx < result.size(); ++idx)
  - assert(fabs(result[idx] - rsi_result[idx]) < 0.0001);
  + df.single_act_visit<double>("IBM_Close", rsi);
  +
  + assert(rsi.get_result().size() == 1707);
  + assert(std::abs(rsi.get_result()[0] - 41.0826) < 0.0001);
  + assert(std::abs(rsi.get_result()[8] - 35.7869) < 0.0001);
  + assert(std::abs(rsi.get_result()[10] - 37.3135) < 0.0001);
  + assert(std::abs(rsi.get_result()[14] - 46.4432) < 0.0001);
  + assert(std::abs(rsi.get_result()[25] - 53.6717) < 0.0001);
  + assert(std::abs(rsi.get_result()[1706] - 43.3186) < 0.0001);
  + assert(std::abs(rsi.get_result()[1698] - 47.0717) < 0.0001);
  + assert(std::abs(rsi.get_result()[1693] - 54.2938) < 0.0001);
  + }
  + catch (const DataFrameError &ex) {
  + std::cout << ex.what() << std::endl;
  + }
  }
  // -----------------------------------------------------------------------------
  