#include "net/base/lookup_string_in_fixed_set.h"
#include <string.h>
#include <algorithm>
#include <cstdint>
#include <limits>
#include <ostream>
#include <utility>
#include <vector>
#include "base/base_paths.h"
#include "base/containers/span.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
namespace test1 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest1-inc.cc"
}
namespace test3 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest3-inc.cc"
}
namespace test4 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest4-inc.cc"
}
namespace test5 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest5-inc.cc"
}
namespace test6 {
#include "net/base/registry_controlled_domains/effective_tld_names_unittest6-inc.cc"
}
struct Expectation { … };
void PrintTo(const Expectation& expectation, std::ostream* os) { … }
class LookupStringInFixedSetTest : public testing::TestWithParam<Expectation> { … };
class Dafsa1Test : public LookupStringInFixedSetTest { … };
TEST_P(Dafsa1Test, BasicTest) { … }
const Expectation kBasicTestCases[] = …;
void RecursivelyEnumerateDafsaLanguage(const FixedSetIncrementalLookup& lookup,
std::vector<char>* sequence,
std::vector<std::string>* language) { … }
std::vector<std::string> EnumerateDafsaLanguage(
base::span<const uint8_t> graph) { … }
INSTANTIATE_TEST_SUITE_P(…);
class Dafsa3Test : public LookupStringInFixedSetTest { … };
TEST_P(Dafsa3Test, TestDafsaTwoByteOffsets) { … }
const Expectation kTwoByteOffsetTestCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
class Dafsa4Test : public LookupStringInFixedSetTest { … };
TEST_P(Dafsa4Test, TestDafsaThreeByteOffsets) { … }
const Expectation kThreeByteOffsetTestCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
class Dafsa5Test : public LookupStringInFixedSetTest { … };
TEST_P(Dafsa5Test, TestDafsaJoinedPrefixes) { … }
const Expectation kJoinedPrefixesTestCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
class Dafsa6Test : public LookupStringInFixedSetTest { … };
TEST_P(Dafsa6Test, TestDafsaJoinedSuffixes) { … }
const Expectation kJoinedSuffixesTestCases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
TEST(LookupStringInFixedSetTest, Dafsa1EnumerateLanguage) { … }
TEST(LookupStringInFixedSetTest, Dafsa5EnumerateLanguage) { … }
TEST(LookupStringInFixedSetTest, Dafsa6EnumerateLanguage) { … }
}
}