<commit_before>eval(loadFile('src/hangul.js'));


testCases(test,

function test_Array_indexOf() {
    var a = [];
    assert.that(Boolean(a.indexOf), isTrue());
    assert.that(a.indexOf('q'), eq(-1));
    for (var i = 0; i < 100; i++)
        a.push(i * i);
    for (var i = 0; i < a.length; i++)
        assert.that(a.indexOf(a[i]), eq(i));
    delete a[34];
    assert.that(a.indexOf(34 * 34), eq(-1));
},

function simple_usage_of_set() {
    var set = new hangul.Set('Alfa', 'Bravo', 'Charlie', 'Delta', 'Echo');
    assert.that(set.has('Alfa'), isTrue());
    assert.that(set.has('Bravo'), isTrue());
    assert.that(set.has('charlie'), isFalse());
},

function simple_usage_of_dict() {
    var dict = new hangul.Dict({
        'A': 'Alfa', 'B': 'Bravo', 'C': 'Charlie', 'D': 'Delta', 'E': 'Echo',
        'F': 'Foxtrot', 'G': 'Golf', 'H': 'Hotel', 'I': 'India',
        'J': 'Juliett', 'K': 'Kilo', 'L': 'Lima', 'M': 'Mike', 'N': 'November',
        'O': 'Oscar', 'P': 'Papa', 'Q': 'Quebec', 'R': 'Romeo', 'S': 'Sierra',
        'T': 'Tango', 'U': 'Uniform', 'V': 'Victor', 'W': 'Whiskey',<commit_msg>renamed test functions<commit_after>eval(loadFile('src/hangul.js'));


testCases(test,

function test_Array_indexOf() {
    var a = [];
    assert.that(Boolean(a.indexOf), isTrue());
    assert.that(a.indexOf('q'), eq(-1));
    for (var i = 0; i < 100; i++)
        a.push(i * i);
    for (var i = 0; i < a.length; i++)
        assert.that(a.indexOf(a[i]), eq(i));
    delete a[34];
    assert.that(a.indexOf(34 * 34), eq(-1));
},

function test_Set() {
    var set = new hangul.Set('Alfa', 'Bravo', 'Charlie', 'Delta', 'Echo');
    assert.that(set.has('Alfa'), isTrue());
    assert.that(set.has('Bravo'), isTrue());
    assert.that(set.has('charlie'), isFalse());
},

function test_Dict() {
    var dict = new hangul.Dict({
        'A': 'Alfa', 'B': 'Bravo', 'C': 'Charlie', 'D': 'Delta', 'E': 'Echo',
        'F': 'Foxtrot', 'G': 'Golf', 'H': 'Hotel', 'I': 'India',
        'J': 'Juliett', 'K': 'Kilo', 'L': 'Lima', 'M': 'Mike', 'N': 'November',
        'O': 'Oscar', 'P': 'Papa', 'Q': 'Quebec', 'R': 'Romeo', 'S': 'Sierra',
        'T': 'Tango', 'U': 'Uniform', 'V': 'Victor', 'W': 'Whiskey',
{'fraction_non_alphanumeric': 0.272108843537415, 'fraction_numerical': 0.011791383219954649, 'mean_word_length': 3.4565656565656564, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '1022727', 'n_tokens_mistral': 926, 'n_tokens_neox': 881, 'n_words': 203}