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


#include <core/connection.hpp>
#include <serialisation/configfile.hpp>

using namespace fc;

BOOST_AUTO_TEST_SUITE(test_serialisation)

BOOST_AUTO_TEST_CASE(test_configfile)
{
	std::stringstream ss;
	ss << "{ \"test_int\": 1 }";

	config_file test_config{ss};


	auto out_port = test_config.out_value<int>("test_int");
	test_config.load();

	BOOST_CHECK_EQUAL(out_port(), 1);
}

BOOST_AUTO_TEST_SUITE_END()<commit_msg>added second port to unit test of config_file<commit_after>#include <boost/test/unit_test.hpp>


#include <core/connection.hpp>
#include <serialisation/configfile.hpp>

using namespace fc;

BOOST_AUTO_TEST_SUITE(test_serialisation)

BOOST_AUTO_TEST_CASE(test_configfile)
{
	std::stringstream ss;
	ss << "{ "
			"\"test_int\": 1,"
			"\"test_float\": 0.5 "
			"}";

	config_file test_config{ss};


	auto out_port = test_config.out_value<int>("test_int");
	auto out_float = test_config.out_value<double>("test_float");
	test_config.load();

	BOOST_CHECK_EQUAL(out_port(), 1);
	BOOST_CHECK_EQUAL(out_float(), 0.5);


}

BOOST_AUTO_TEST_SUITE_END()
{'fraction_non_alphanumeric': 0.14260089686098654, 'fraction_numerical': 0.007174887892376682, 'mean_word_length': 6.44, 'pattern_counts': {'":': 3, '<': 16, '<?xml version=': 0, '>': 12, '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': '5203315', 'n_tokens_mistral': 447, 'n_tokens_neox': 423, 'n_words': 63}