<commit_before>#include <stdexcept>

#include "tests.hpp"

#include "react/aggregators/recent_trees_aggregator.hpp"
#include "react/aggregators/unordered_call_tree_aggregator.hpp"

BOOST_AUTO_TEST_SUITE( aggregator_suite )

using namespace react;

BOOST_AUTO_TEST_CASE( recent_trees_aggregator_test )
{
	recent_trees_aggregator_t aggregator(2);
	actions_set_t actions_set;
	call_tree_t call_tree(actions_set);
	aggregator.aggregate(call_tree);
}

BOOST_AUTO_TEST_CASE( unordered_call_tree_aggregator_test )
{
	actions_set_t actions_set;
	unordered_call_tree_aggregator_t aggregator(actions_set);
	call_tree_t call_tree(actions_set);
	aggregator.aggregate(call_tree);
}

BOOST_AUTO_TEST_SUITE_END()
<commit_msg>tests: histogram tests added. fix in aggregators constructors<commit_after>#include <stdexcept>

#include "tests.hpp"

#include "react/aggregators/recent_trees_aggregator.hpp"
#include "react/aggregators/unordered_call_tree_aggregator.hpp"
#include "react/aggregators/histogram_aggregator.hpp"
#include "react/utils.hpp"

BOOST_AUTO_TEST_SUITE( aggregator_suite )

using namespace react;

BOOST_AUTO_TEST_CASE( recent_trees_aggregator_test )
{
	actions_set_t actions_set;
	recent_trees_aggregator_t aggregator(actions_set, 2);
	call_tree_t call_tree(actions_set);
	aggregator.aggregate(call_tree);
}

BOOST_AUTO_TEST_CASE( unordered_call_tree_aggregator_test )
{
	actions_set_t actions_set;
	unordered_call_tree_aggregator_t aggregator(actions_set);
	call_tree_t call_tree(actions_set);
	aggregator.aggregate(call_tree);
}

BOOST_AUTO_TEST_CASE( histogram1D_test )
{
	std::vector<int> ticks = {1, 2, 4, 8, 16};
	histogram1D_t histogram1D(ticks);
	histogram1D.update(0);
	histogram1D.update(1);

	BOOST_REQUIRE_EQUAL( histogram1D.get(0), 1 );
}

BOOST_AUTO_TEST_CASE( histogram2D_test )
{
	std::vector<int> ticks = {1, 2, 4, 8, 16};
	histogram2D_t histogram2D(ticks, ticks);
	histogram2D.update(0, 3);
	histogram2D.update(1, 3);
}

BOOST_AUTO_TEST_SUITE_END()
{'fraction_non_alphanumeric': 0.0975609756097561, 'fraction_numerical': 0.01676829268292683, 'mean_word_length': 8.747524752475247, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3484194', 'n_tokens_mistral': 814, 'n_tokens_neox': 753, 'n_words': 108}