<commit_before>package negronicache<commit_msg>Add test functions for allocate a cache instance.<commit_after>package negronicache

func TestCache_NewMemoryCache(t testing.T) {
    c := NewMemoryCache()
    assert.NotNil(t, c.fs)
    assert.NotNil(t, c.stale)
}

func TestCache_NewDiskCache(t testing.T) {
    c, err := NewDiskCache("./cache")
    assert.Nil(t, err)

    assert.NotNil(t, c.fs)
    assert.NotNil(t, c.stale)
}
{'fraction_non_alphanumeric': 0.1267605633802817, 'fraction_numerical': 0.0, 'mean_word_length': 4.2073170731707314, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1943863', 'n_tokens_mistral': 156, 'n_tokens_neox': 154, 'n_words': 31}