<commit_before>#include "grune/all.hpp"

#include <boost/filesystem.hpp>
#include <fstream>

#define ADD_TEST(name) \
    extern void name(std::ostream&);

ADD_TEST(test_anbncn);
ADD_TEST(test_numbers);
ADD_TEST(test_numbers_simple);
ADD_TEST(test_turtle);

typedef void (*test_fcn_t)(std::ostream&);
void run_test(test_fcn_t test, const std::string& name)
{
    std::ofstream results("./results/" + name + ".results");
    test(results);
}

#define RUN_TEST(name) run_test(name, #name)

int main()
{
    boost::filesystem::remove_all("./results");
    boost::filesystem::create_directories("./results");

    RUN_TEST(test_anbncn);
    RUN_TEST(test_numbers_simple);
    RUN_TEST(test_numbers);
    RUN_TEST(test_turtle);

    return 0;
}
<commit_msg>Add log print to generate test main<commit_after>#include "grune/all.hpp"

#include <boost/filesystem.hpp>
#include <fstream>

#define ADD_TEST(name) \
    extern void name(std::ostream&);

ADD_TEST(test_anbncn);
ADD_TEST(test_numbers);
ADD_TEST(test_numbers_simple);
ADD_TEST(test_turtle);

typedef void (*test_fcn_t)(std::ostream&);
void run_test(test_fcn_t test, const std::string& name)
{
    std::cout << "Running test " << name << "..." << std::endl;
    std::ofstream results("./results/" + name + ".results");
    test(results);
}

#define RUN_TEST(name) run_test(name, #name)

int main()
{
    boost::filesystem::remove_all("./results");
    boost::filesystem::create_directories("./results");

    RUN_TEST(test_anbncn);
    RUN_TEST(test_numbers_simple);
    RUN_TEST(test_numbers);
    RUN_TEST(test_turtle);

    return 0;
}

{'fraction_non_alphanumeric': 0.16226415094339622, 'fraction_numerical': 0.0012578616352201257, 'mean_word_length': 5.441295546558704, 'pattern_counts': {'":': 0, '<': 15, '<?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': '3275743', 'n_tokens_mistral': 607, 'n_tokens_neox': 578, 'n_words': 97}