<commit_before>#include <string.h>
#include "yatf/include/yatf.h"

using namespace yacppl;

TEST(string, can_be_created) {
    string str;
    REQUIRE(str == "");
    REQUIRE_FALSE(str == "abc");
}

TEST(string, can_be_constructed_from_cstring) {
    string str("test_string");
    REQUIRE(str == "test_string");
    REQUIRE_EQ(*(str.cend() - 1), 'g');
    REQUIRE_EQ(*(str.end() - 1), 'g');
    REQUIRE_EQ(*(str.cbegin()), 't');
    REQUIRE_EQ(*(str.begin()), 't');
}

TEST(string, can_be_appended) {
    {
        string str("hello ");
        str.append("world");
        REQUIRE_EQ((const char *)str, "hello world");
    }
    {
        string str;
        str.append("world");
        REQUIRE_EQ((const char *)str, "world");
        str.append("hello hello hello");
        REQUIRE_EQ((const char *)str, "worldhello hello hello");
    }
}
<commit_msg>Add another test<commit_after>#include <string.h>
#include "yatf/include/yatf.h"

using namespace yacppl;

TEST(string, can_be_created) {
    string str;
    REQUIRE(str == "");
    REQUIRE_FALSE(str == "abc");
}

TEST(string, can_be_constructed_from_cstring) {
    string str("test_string");
    REQUIRE(str == "test_string");
    REQUIRE_EQ(*(str.cend() - 1), 'g');
    REQUIRE_EQ(*(str.end() - 1), 'g');
    REQUIRE_EQ(*(str.cbegin()), 't');
    REQUIRE_EQ(*(str.begin()), 't');
}

TEST(string, can_be_iterated) {
    string str("test_string");
    size_t i = 0;
    for (auto c : str) {
        REQUIRE_EQ(c, "test_string"[i++]);
    }
}

TEST(string, can_be_appended) {
    {
        string str("hello ");
        str.append("world");
        REQUIRE_EQ((const char *)str, "hello world");
    }
    {
        string str;
        str.append("world");
        REQUIRE_EQ((const char *)str, "world");
        str.append("hello hello hello");
        REQUIRE_EQ((const char *)str, "worldhello hello hello");
    }
}

{'fraction_non_alphanumeric': 0.18633208756006406, 'fraction_numerical': 0.0026695141484249867, 'mean_word_length': 3.082788671023965, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2528649', 'n_tokens_mistral': 735, 'n_tokens_neox': 701, 'n_words': 127}