#include "components/url_pattern_index/ngram_extractor.h"
#include <stdint.h>
#include <string>
#include <vector>
#include "testing/gtest/include/gtest/gtest.h"
namespace url_pattern_index {
namespace {
bool IsSeparatorTrue(char) { … }
bool IsSeparatorFalse(char) { … }
bool IsSpecialChar(char c) { … }
template <typename IntType>
IntType EncodeStringToInteger(const std::string& data) { … }
template <typename IntType>
std::vector<IntType> EncodeStringsToIntegers(
const std::vector<std::string>& ngrams) { … }
}
TEST(NGramExtractorTest, EmptyString) { … }
TEST(NGramExtractorTest, ShortString) { … }
TEST(NGramExtractorTest, ShortPieces) { … }
TEST(NGramExtractorTest, IsSeparatorAlwaysTrue) { … }
TEST(NGramExtractorTest, IsSeparatorAlwaysFalse) { … }
TEST(NGramExtractorTest, LowerCaseExtraction) { … }
TEST(NGramExtractorTest, CaseSensitiveExtraction) { … }
TEST(NGramExtractorTest, NGramsArePresent) { … }
}