<commit_before>
#include "comp.h"

#include <sstream>

int main() {
	std::istringstream s("this is a string");
	bf::comp c(&s);

	c.run();
}<commit_msg>moved test code to test class, main just declares a test object<commit_after>
#include "comp.h"

#include <sstream>

class test {
public:
	test();
	~test();
private:
	// initialized in order.
	std::istream *in;
	bf::comp c;
};

test::test() :
	in(static_cast<std::istream *>(new std::istringstream("this is a string"))),
	c(in) {
	c.run();
}

test::~test() {
	delete in;
}

int main() { test t; }
{'fraction_non_alphanumeric': 0.19343065693430658, 'fraction_numerical': 0.0, 'mean_word_length': 4.6020408163265305, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '1702245', 'n_tokens_mistral': 219, 'n_tokens_neox': 216, 'n_words': 60}