<commit_before>#include "kontr.h"

UNIT_TEST(unit_diff) {
    name("unit_diff.pl");

    log("[TEST]\tHello");

    compile();

    //In case the compilation has failed, end the test
    IF (compilation()->result() != "clean",
        {
            add_tag("compilation");
            log_tag("nanecisto", "[FAIL]\tProgram se nepodarilo zkompilovat");
            RETURN();
        });

    //Otherwise continue and run the application
    run("/dev/null");

    IF (!execution()->success(),
        {
            log_run_fail("[FAIL]");
            add_tag("execution");
            add_tag("nanecisto");
            RETURN();
        });

    IF (execution()->exit_value() != 0,
        {
            log_tag("nanecisto", "[FAIL]\tTestovaci program skoncil s nenulovou navratovou hodnotou.");
            add_tag("exit_value");
            RETURN();
        });


    //Compare the output to the expected output file
    diff_stdout("casespace", "output");
    VAR(fail, difference()->exit_value());
    diff_stdout("casespace", "output2");
    IF (difference()->exit_value() != 0 && fail != 0,
        {
            log_tag("nanecisto","");
            add_tag("different_output");
            RETURN();
        });

    //Output in case of success
    log_tag("ok", "[OK]\tVystup je spravny, odevzdani funguje.");
    add_points("points", 1);
}

MASTER_TEST(master_nanecisto) {
    name("master_nanecisto.pl");

    stage_compiled_student_file("hello.cpp");

    register_unit(unit_diff);
}
<commit_msg>Missing log in Hello.<commit_after>#include "kontr.h"

UNIT_TEST(unit_diff) {
    name("unit_diff.pl");

    log("[TEST]\tHello");

    compile();

    //In case the compilation has failed, end the test
    IF (compilation()->result() != "clean",
        {
            add_tag("compilation");
            log_tag("nanecisto", "[FAIL]\tProgram se nepodarilo zkompilovat");
            RETURN();
        });

    //Otherwise continue and run the application
    run("/dev/null");

    IF (!execution()->success(),
        {
            log_run_fail("[FAIL]");
            add_tag("execution");
            add_tag("nanecisto");
            RETURN();
        });

    IF (execution()->exit_value() != 0,
        {
            log_tag("nanecisto", "[FAIL]\tTestovaci program skoncil s nenulovou navratovou hodnotou.");
            add_tag("exit_value");
            RETURN();
        });


    //Compare the output to the expected output file
    diff_stdout("casespace", "output");
    VAR(fail, difference()->exit_value());
    diff_stdout("casespace", "output2");
    IF (difference()->exit_value() != 0 && fail != 0,
        {
            log_tag("nanecisto","Neshodny vystup");
            add_tag("different_output");
            RETURN();
        });

    //Output in case of success
    log_tag("ok", "[OK]\tVystup je spravny, odevzdani funguje.");
    add_points("points", 1);
}

MASTER_TEST(master_nanecisto) {
    name("master_nanecisto.pl");

    stage_compiled_student_file("hello.cpp");

    register_unit(unit_diff);
}

{'fraction_non_alphanumeric': 0.16101415870925256, 'fraction_numerical': 0.0032927230819888046, 'mean_word_length': 2.390625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2571572', 'n_tokens_mistral': 967, 'n_tokens_neox': 920, 'n_words': 184}