<commit_before>#include <blackhole/formatter/string/builder.hpp>

#include "global.hpp"

using namespace blackhole;

TEST(PatternParser, ParseVariadicLocalScopeToken) {
    std::string pattern("%(...L)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ("...1", formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicEventScopeToken) {
    std::string pattern("%(...E)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ("...2", formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicGlobalScopeToken) {
    std::string pattern("%(...G)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ("...4", formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicThreadScopeToken) {
    std::string pattern("%(...T)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ("...8", formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicUniverseScopeToken) {
    std::string pattern("%(...U)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ("...16", formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicMixedScopeTokens) {
    std::string pattern("%(...LE)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ("...3", formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, SquishScopes) {
    std::string pattern("%(...LLLUUE)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ("...19", formatter::string::aux::extract_key(it, pattern.end()));
}<commit_msg>[Bug Fix] Oops, forgot to fix tests.<commit_after>#include <blackhole/formatter/string/builder.hpp>

#include "global.hpp"

using namespace blackhole;

TEST(PatternParser, ParseVariadicLocalScopeToken) {
    std::string pattern("%(...L)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ(std::make_tuple(std::string("...1"), formatter::string::variadic),
              formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicEventScopeToken) {
    std::string pattern("%(...E)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ(std::make_tuple(std::string("...2"), formatter::string::variadic),
              formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicGlobalScopeToken) {
    std::string pattern("%(...G)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ(std::make_tuple(std::string("...4"), formatter::string::variadic),
              formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicThreadScopeToken) {
    std::string pattern("%(...T)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ(std::make_tuple(std::string("...8"), formatter::string::variadic),
              formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicUniverseScopeToken) {
    std::string pattern("%(...U)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ(std::make_tuple(std::string("...16"), formatter::string::variadic),
              formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, ParseVariadicMixedScopeTokens) {
    std::string pattern("%(...LE)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ(std::make_tuple(std::string("...3"), formatter::string::variadic),
              formatter::string::aux::extract_key(it, pattern.end()));
}

TEST(PatternParser, SquishScopes) {
    std::string pattern("%(...LLLUUE)s");
    std::string::const_iterator it = pattern.begin();
    EXPECT_EQ(std::make_tuple(std::string("...19"), formatter::string::variadic),
              formatter::string::aux::extract_key(it, pattern.end()));
}
{'fraction_non_alphanumeric': 0.20259278088459584, 'fraction_numerical': 0.004575495678698526, 'mean_word_length': 5.3983739837398375, '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': '6187119', 'n_tokens_mistral': 1255, 'n_tokens_neox': 1231, 'n_words': 167}