<commit_before>#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE JPetScopeParamGetterTest
#include <boost/test/unit_test.hpp>
#include "../JPetScopeParamGetter/JPetScopeParamGetter.h"

BOOST_AUTO_TEST_SUITE(ScopeParamGetterTS)

BOOST_AUTO_TEST_CASE(defaultConstructorTest)
{
  JPetScopeParamGetter paramGetter;
}

BOOST_AUTO_TEST_CASE(dummyFillingTest)
{
  using namespace scope_config;
  using VecOfStrings = std::vector<std::string>;
  JPetScopeParamGetter paramGetter;
  Config config;
  config.fLocation="data";
  config.fCollimatorPositions = VecOfStrings { "1 5 2", "12", "6"};
  config.fBSlots= std::vector<BSlot>{ BSlot(-1,false,"",-1., -1), BSlot(-1,false,"",-1., -1)};
  config.fPMs = std::vector<PM>{PM(3,"C2"), PM(98, "C4"), PM(32, "C1"), PM(42, "C3")}; 
  config.fScins=std::vector<Scin>{Scin(32), Scin(12)};
  config.fName="config1";
  JPetParamBank* bank = paramGetter.generateParamBank(config);
  
  BOOST_REQUIRE(bank->getScintillatorsSize() == 2);
  BOOST_REQUIRE(bank->getPMsSize() == 4);
  BOOST_REQUIRE(bank->getPMCalibsSize() == 0); 
  BOOST_REQUIRE(bank->getBarrelSlotsSize() == 2);
  BOOST_REQUIRE(bank->getLayersSize() == 0);
  BOOST_REQUIRE(bank->getFramesSize() == 0);
  BOOST_REQUIRE(bank->getFEBsSize() == 0);
  BOOST_REQUIRE(bank->getTRBsSize() == 0);
  BOOST_REQUIRE(bank->getTOMBChannelsSize() == 0);
}

BOOST_AUTO_TEST_SUITE_END()
<commit_msg>Add tests to JPetScopeParamGetter<commit_after>#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE JPetScopeParamGetterTest
#include <boost/test/unit_test.hpp>
#include "../JPetScopeParamGetter/JPetScopeParamGetter.h"

BOOST_AUTO_TEST_SUITE(ScopeParamGetterTS)

BOOST_AUTO_TEST_CASE(defaultConstructorTest)
{
  JPetScopeParamGetter paramGetter;
}

BOOST_AUTO_TEST_CASE(dummyFillingTest)
{
  JPetScopeParamGetter::clearParamCache();
  using namespace scope_config;
  using VecOfStrings = std::vector<std::string>;
  JPetScopeParamGetter paramGetter;
  const char* testConfigFile = "unitTestData/JPetScopeParamGetterTest/config.json";
  JPetParamBank* bank = paramGetter.generateParamBank(testConfigFile);
  
  BOOST_REQUIRE(bank->getScintillatorsSize() == 2);
  BOOST_REQUIRE(bank->getPMsSize() == 4);
  BOOST_REQUIRE(bank->getPMCalibsSize() == 0); 
  BOOST_REQUIRE(bank->getBarrelSlotsSize() == 2);
  BOOST_REQUIRE(bank->getLayersSize() == 0);
  BOOST_REQUIRE(bank->getFramesSize() == 0);
  BOOST_REQUIRE(bank->getFEBsSize() == 0);
  BOOST_REQUIRE(bank->getTRBsSize() == 0);
  BOOST_REQUIRE(bank->getTOMBChannelsSize() == 0);
}

BOOST_AUTO_TEST_SUITE_END()

{'fraction_non_alphanumeric': 0.14769594328475777, 'fraction_numerical': 0.01811736904293029, 'mean_word_length': 7.410596026490066, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6713183', 'n_tokens_mistral': 990, 'n_tokens_neox': 970, 'n_words': 123}