<commit_before>#include <boost/test/unit_test.hpp>

#include "ports/event_ports.hpp"
#include "event_sink_with_queue.hpp"
#include "core/connection.hpp"

using namespace fc;


template<class T>
struct event_sink
{
	void operator()(T in)
	{
		*storage = in;
	}
	std::shared_ptr<T> storage = std::make_shared<T>();
};

namespace fc
{

template<class T>
struct is_passive_sink<event_sink<T>> : public std::true_type
{};

} // namespace fc

template<class T>
struct event_vector_sink
{
	void operator()(T in)
	{
		storage->push_back(in);
	}
	std::shared_ptr<std::vector<T>> storage =
			std::make_shared<std::vector<T>>();
};

template<class T>
struct is_port<event_sink<T>> : public std::true_type
{
};

template<class T>
struct event_vector_sink
{
	void operator()(T in)
	{
		storage->push_back(in);
	}
	std::shared_ptr<std::vector<T>> storage =
			std::make_shared<std::vector<T>>();
};

namespace fc{

template<class T>
struct is_passive_sink<event_vector_sink<T>> : public std::true_type
{
};

template<class T>
struct is_port<event_vector_sink<T>> : public std::true_type
{
};
}


BOOST_AUTO_TEST_SUITE(test_events)
namespace fc
{

template<class T>
struct is_passive_sink<event_vector_sink<T>> : public std::true_type
{};

} // namespace fc

BOOST_AUTO_TEST_SUITE( events )

BOOST_AUTO_TEST_CASE( connections )
{
	static_assert(is_active<event_out_port<int>>::value,
			"event_out_port is active by definition");
	static_assert(is_passive<event_in_port<int>>::value,
			"event_in_port is passive by definition");
	static_assert(!is_active<event_in_port<int>>::value,
			"event_in_port is not active by definition");
	static_assert(!is_passive<event_out_port<int>>::value,
			"event_out_port is not passive by definition");

	event_out_port<int> test_event;<commit_msg>fixed test events after merge<commit_after>#include <boost/test/unit_test.hpp>

#include "ports/event_ports.hpp"
#include "event_sink_with_queue.hpp"
#include "core/connection.hpp"

using namespace fc;


template<class T>
struct event_sink
{
	void operator()(T in)
	{
		*storage = in;
	}
	std::shared_ptr<T> storage = std::make_shared<T>();
};

namespace fc
{

template<class T>
struct is_passive_sink<event_sink<T>> : public std::true_type
{};


template<class T>
struct is_port<event_sink<T>> : public std::true_type
{
};

} // namespace fc

template<class T>
struct event_vector_sink
{
	void operator()(T in)
	{
		storage->push_back(in);
	}
	std::shared_ptr<std::vector<T>> storage =
			std::make_shared<std::vector<T>>();
};

namespace fc
{

template<class T>
struct is_passive_sink<event_vector_sink<T>> : public std::true_type
{};

} // namespace fc

BOOST_AUTO_TEST_SUITE(test_events)

BOOST_AUTO_TEST_CASE( connections )
{
	static_assert(is_active<event_out_port<int>>::value,
			"event_out_port is active by definition");
	static_assert(is_passive<event_in_port<int>>::value,
			"event_in_port is passive by definition");
	static_assert(!is_active<event_in_port<int>>::value,
			"event_in_port is not active by definition");
	static_assert(!is_passive<event_out_port<int>>::value,
			"event_out_port is not passive by definition");

	event_out_port<int> test_event;
{'fraction_non_alphanumeric': 0.13990461049284578, 'fraction_numerical': 0.0, 'mean_word_length': 6.6174334140435835, 'pattern_counts': {'":': 0, '<': 68, '<?xml version=': 0, '>': 71, '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': '6868957', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1193, 'n_words': 212}