<commit_before>#include <cppunit/extensions/HelperMacros.h>
#include "DominanceStatus.hpp"


class DominanceStatusTest : public CppUnit::TestFixture {
  CPPUNIT_TEST_SUITE(DominanceStatusTest);
  CPPUNIT_TEST(testDominanceStatus);
  CPPUNIT_TEST_SUITE_END();
 private:
  DominanceStatus nd;
  DominanceStatus adb;
  DominanceStatus apdb;
  DominanceStatus bda;
  DominanceStatus bpda;
  DominanceStatus md;
 public:
  void setUp() {
    nd = DominanceStatus::NO_DOM;
    adb = DominanceStatus::A_DOM_B;
    apdb = DominanceStatus::A_PART_DOM_B;
    bda = DominanceStatus::B_DOM_A;
    bpda = DominanceStatus::B_PART_DOM_A;
    md = DominanceStatus::MUTUAL_DOM;
  }
  void tearDown() {}
  void testDominanceStatus() {
    CPPUNIT_ASSERT (nd == DominanceStatus::NO_DOM);
    CPPUNIT_ASSERT (adb == DominanceStatus::A_DOM_B);
    CPPUNIT_ASSERT (apdb == DominanceStatus::A_PART_DOM_B);
    CPPUNIT_ASSERT (bda == DominanceStatus::B_DOM_A);
    CPPUNIT_ASSERT (bpda == DominanceStatus::B_PART_DOM_A);
    CPPUNIT_ASSERT (md == DominanceStatus::MUTUAL_DOM);
  }
};

CPPUNIT_TEST_SUITE_REGISTRATION(DominanceStatusTest);
<commit_msg>DominanceStatus: Add invert test<commit_after>#include <cppunit/extensions/HelperMacros.h>
#include "DominanceStatus.hpp"


class DominanceStatusTest : public CppUnit::TestFixture {
  CPPUNIT_TEST_SUITE(DominanceStatusTest);
  CPPUNIT_TEST(testDominanceStatus);
  CPPUNIT_TEST(testInvert);
  CPPUNIT_TEST_SUITE_END();
 private:
  DominanceStatus nd;
  DominanceStatus adb;
  DominanceStatus apdb;
  DominanceStatus bda;
  DominanceStatus bpda;
  DominanceStatus md;
 public:
  void setUp() {
    nd = DominanceStatus::NO_DOM;
    adb = DominanceStatus::A_DOM_B;
    apdb = DominanceStatus::A_PART_DOM_B;
    bda = DominanceStatus::B_DOM_A;
    bpda = DominanceStatus::B_PART_DOM_A;
    md = DominanceStatus::MUTUAL_DOM;
  }
  void tearDown() {}
  void testDominanceStatus() {
    CPPUNIT_ASSERT (nd == DominanceStatus::NO_DOM);
    CPPUNIT_ASSERT (adb == DominanceStatus::A_DOM_B);
    CPPUNIT_ASSERT (apdb == DominanceStatus::A_PART_DOM_B);
    CPPUNIT_ASSERT (bda == DominanceStatus::B_DOM_A);
    CPPUNIT_ASSERT (bpda == DominanceStatus::B_PART_DOM_A);
    CPPUNIT_ASSERT (md == DominanceStatus::MUTUAL_DOM);
  }
  void testInvert() {
    CPPUNIT_ASSERT (invert(nd) == DominanceStatus::NO_DOM);
    CPPUNIT_ASSERT (invert(adb) == DominanceStatus::B_DOM_A);
    CPPUNIT_ASSERT (invert(apdb) == DominanceStatus::B_PART_DOM_A);
    CPPUNIT_ASSERT (invert(bda) == DominanceStatus::A_DOM_B);
    CPPUNIT_ASSERT (invert(bpda) == DominanceStatus::A_PART_DOM_B);
    CPPUNIT_ASSERT (invert(md) == DominanceStatus::MUTUAL_DOM);
  }
};

CPPUNIT_TEST_SUITE_REGISTRATION(DominanceStatusTest);

{'fraction_non_alphanumeric': 0.10918480265584656, 'fraction_numerical': 0.0, 'mean_word_length': 5.831234256926952, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4413185', 'n_tokens_mistral': 1020, 'n_tokens_neox': 999, 'n_words': 148}