<commit_before>/** Copyright (C) 2016, 2017 European Spallation Source ERIC */

#include <multiblade/mbcaen/MB16Detector.h>
#include <test/TestBase.h>

class MB16DetectorTest : public TestBase {};

/** Test cases below */
TEST_F(MB16DetectorTest, CassetteValid) {
  MB16Detector mbg;

  ASSERT_EQ(0, mbg.cassette(137));
  ASSERT_EQ(1, mbg.cassette(143));
  ASSERT_EQ(2, mbg.cassette(142));
  ASSERT_EQ(3, mbg.cassette(31));
  ASSERT_EQ(4, mbg.cassette(33));
  ASSERT_EQ(5, mbg.cassette(34));
}

TEST_F(MB16DetectorTest, CassetteInValid) {
  MB16Detector mbg;

  ASSERT_EQ(-1, mbg.cassette(-1));
  ASSERT_EQ(-1, mbg.cassette(0));
  ASSERT_EQ(-1, mbg.cassette(30));
  ASSERT_EQ(-1, mbg.cassette(32));
  ASSERT_EQ(-1, mbg.cassette(35));
  ASSERT_EQ(-1, mbg.cassette(136));
  ASSERT_EQ(-1, mbg.cassette(138));
  ASSERT_EQ(-1, mbg.cassette(141));
  ASSERT_EQ(-1, mbg.cassette(144));
}

int main(int argc, char **argv) {
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}<commit_msg>corrected unit test after constructor changes for MB16Detector<commit_after>/** Copyright (C) 2016, 2017 European Spallation Source ERIC */

#include <multiblade/mbcaen/MB16Detector.h>
#include <test/TestBase.h>

class MB16DetectorTest : public TestBase {};

std::vector<struct MB16Detector::Digitiser> digits {
  {0, 137} , {1, 143}, {2, 142}, {3, 31}, {4, 33}, {5, 34}
};

/** Test cases below */
TEST_F(MB16DetectorTest, CassetteValid) {
  MB16Detector mbg(digits);

  ASSERT_EQ(0, mbg.cassette(137));
  ASSERT_EQ(1, mbg.cassette(143));
  ASSERT_EQ(2, mbg.cassette(142));
  ASSERT_EQ(3, mbg.cassette(31));
  ASSERT_EQ(4, mbg.cassette(33));
  ASSERT_EQ(5, mbg.cassette(34));
}

TEST_F(MB16DetectorTest, CassetteInValid) {
  MB16Detector mbg(digits);

  ASSERT_EQ(-1, mbg.cassette(-1));
  ASSERT_EQ(-1, mbg.cassette(0));
  ASSERT_EQ(-1, mbg.cassette(30));
  ASSERT_EQ(-1, mbg.cassette(32));
  ASSERT_EQ(-1, mbg.cassette(35));
  ASSERT_EQ(-1, mbg.cassette(136));
  ASSERT_EQ(-1, mbg.cassette(138));
  ASSERT_EQ(-1, mbg.cassette(141));
  ASSERT_EQ(-1, mbg.cassette(144));
}

int main(int argc, char **argv) {
  testing::InitGoogleTest(&argc, argv);
  return RUN_ALL_TESTS();
}
{'fraction_non_alphanumeric': 0.17796219455970494, 'fraction_numerical': 0.07607192254495158, 'mean_word_length': 5.363636363636363, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '3625247', 'n_tokens_mistral': 1012, 'n_tokens_neox': 918, 'n_words': 156}