<commit_before>#define CATCH_CONFIG_MAIN
#include "catch.hpp"

#include <random>
#include <cassert>
#include <vector>

#undef NDEBUG

#include "dg/analysis/Offset.h"
#include "dg/analysis/ReachingDefinitions/DisjunctiveIntervalMap.h"

using namespace dg::analysis::rd;
using dg::analysis::Offset;

static std::ostream& operator<<(std::ostream& os, const std::vector<std::tuple<int,int,int>>& v) {
    os << "{";
    for (const auto& tup : v) {
        os << "{ ";
        os << std::get<0>(tup) << "-";
        os << std::get<1>(tup) << ": ";
        os << std::get<2>(tup);
        os << " }, ";
    }
    os << "}";
    return os;
}


template<typename ValueT, typename IntervalValueT>
class DisjunctiveIntervalMapMatcher : public Catch::MatcherBase<DisjunctiveIntervalMap<ValueT, IntervalValueT>> {
    std::vector<std::tuple<IntervalValueT, IntervalValueT, ValueT>> structure;
public:
    DisjunctiveIntervalMapMatcher(std::vector<std::tuple<IntervalValueT, IntervalValueT, ValueT>> s) : structure(std::move(s)) { }

    virtual bool match(const DisjunctiveIntervalMap<ValueT, IntervalValueT>& M) const {
        if (M.size() != structure.size()) {
            return false;
        }

        size_t i = 0;
        for (const auto& pair : M) {
            const auto& interval = pair.first;
            const auto& values = pair.second;

            if(interval.start != std::get<0>(structure[i])) {
                return false;
            }<commit_msg>tests: use override instead of virtual keyword<commit_after>#define CATCH_CONFIG_MAIN
#include "catch.hpp"

#include <random>
#include <cassert>
#include <vector>

#undef NDEBUG

#include "dg/analysis/Offset.h"
#include "dg/analysis/ReachingDefinitions/DisjunctiveIntervalMap.h"

using namespace dg::analysis::rd;
using dg::analysis::Offset;

static std::ostream& operator<<(std::ostream& os, const std::vector<std::tuple<int,int,int>>& v) {
    os << "{";
    for (const auto& tup : v) {
        os << "{ ";
        os << std::get<0>(tup) << "-";
        os << std::get<1>(tup) << ": ";
        os << std::get<2>(tup);
        os << " }, ";
    }
    os << "}";
    return os;
}


template<typename ValueT, typename IntervalValueT>
class DisjunctiveIntervalMapMatcher : public Catch::MatcherBase<DisjunctiveIntervalMap<ValueT, IntervalValueT>> {
    std::vector<std::tuple<IntervalValueT, IntervalValueT, ValueT>> structure;
public:
    DisjunctiveIntervalMapMatcher(std::vector<std::tuple<IntervalValueT, IntervalValueT, ValueT>> s) : structure(std::move(s)) { }

    bool match(const DisjunctiveIntervalMap<ValueT, IntervalValueT>& M) const override {
        if (M.size() != structure.size()) {
            return false;
        }

        size_t i = 0;
        for (const auto& pair : M) {
            const auto& interval = pair.first;
            const auto& values = pair.second;

            if(interval.start != std::get<0>(structure[i])) {
                return false;
            }
{'fraction_non_alphanumeric': 0.15605958023019634, 'fraction_numerical': 0.003385240352064997, 'mean_word_length': 3.3013100436681224, 'pattern_counts': {'":': 2, '<': 77, '<?xml version=': 0, '>': 37, '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': '356004', 'n_tokens_mistral': 964, 'n_tokens_neox': 932, 'n_words': 198}