<commit_before>#pragma once

#include <iostream>

#include "cxxtest/TestSuite.h"

#include "Filter.hpp"

class FilterTest : public CxxTest::TestSuite
{
  public:
    void setUp() override {}
    void tearDown() override {}

    void testEndResult()
    {
        zcm::Filter f(1, 0.8);
        for (double i = 0; i < 2000; i++) f(10, 0.01);
        TS_ASSERT_DELTA(f[f.FilterMode::LOW_PASS],  10, 1e-5);
        TS_ASSERT_DELTA(f[f.FilterMode::BAND_PASS],  0, 1e-5);
        TS_ASSERT_DELTA(f[f.FilterMode::HIGH_PASS],  0, 1e-5);
    }

    void testConvergenceTimeEst()
    {
        std::cout << zcm::Filter::convergenceTimeToNatFreq(10, 0.8) << std::endl;
    }
};<commit_msg>Removed print from cxxtest<commit_after>#pragma once

#include <iostream>

#include "cxxtest/TestSuite.h"

#include "Filter.hpp"

class FilterTest : public CxxTest::TestSuite
{
  public:
    void setUp() override {}
    void tearDown() override {}

    void testEndResult()
    {
        zcm::Filter f(1, 0.8);
        for (double i = 0; i < 2000; i++) f(10, 0.01);
        TS_ASSERT_DELTA(f[f.FilterMode::LOW_PASS],  10, 1e-5);
        TS_ASSERT_DELTA(f[f.FilterMode::BAND_PASS],  0, 1e-5);
        TS_ASSERT_DELTA(f[f.FilterMode::HIGH_PASS],  0, 1e-5);
    }

    void testConvergenceTimeEst()
    {
        TS_ASSERT_DELTA(zcm::Filter::convergenceTimeToNatFreq(10, 0.8), 0.24848, 1e-5);
    }
};
{'fraction_non_alphanumeric': 0.1568627450980392, 'fraction_numerical': 0.04502541757443718, 'mean_word_length': 3.175757575757576, 'pattern_counts': {'":': 0, '<': 11, '<?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': '1979350', 'n_tokens_mistral': 592, 'n_tokens_neox': 534, 'n_words': 99}