#include "rule.h"
#include <libaddressinput/address_field.h>
#include <libaddressinput/localization.h>
#include <cstddef>
#include <string>
#include <utility>
#include <vector>
#include <gtest/gtest.h>
#include "format_element.h"
#include "grit.h"
#include "messages.h"
#include "region_data_constants.h"
#include "util/json.h"
namespace {
AddressField;
ADMIN_AREA;
FormatElement;
INVALID_MESSAGE_ID;
Json;
LOCALITY;
Localization;
RegionDataConstants;
Rule;
STREET_ADDRESS;
TEST(RuleTest, CopyOverwritesRule) { … }
TEST(RuleTest, ParseOverwritesRule) { … }
TEST(RuleTest, ParsesFormatCorrectly) { … }
TEST(RuleTest, ParsesNameCorrectly) { … }
TEST(RuleTest, ParsesLatinNameCorrectly) { … }
TEST(RuleTest, ParsesLatinFormatCorrectly) { … }
TEST(RuleTest, ParsesRequiredCorrectly) { … }
TEST(RuleTest, ParsesSubKeysCorrectly) { … }
TEST(RuleTest, ParsesLanguagesCorrectly) { … }
TEST(RuleTest, ParsesPostalCodeExampleCorrectly) { … }
TEST(RuleTest, ParsesPostServiceUrlCorrectly) { … }
TEST(RuleTest, PostalCodeMatcher) { … }
TEST(RuleTest, PostalCodeMatcherInvalidRegExp) { … }
TEST(RuleTest, ParsesJsonRuleCorrectly) { … }
TEST(RuleTest, EmptyStringIsNotValid) { … }
TEST(RuleTest, EmptyDictionaryIsValid) { … }
class PostalCodeNameParseTest
: public testing::TestWithParam<std::pair<std::string, int> > { … };
TEST_P(PostalCodeNameParseTest, ParsedCorrectly) { … }
INSTANTIATE_TEST_SUITE_P(…);
class LocalityNameParseTest
: public testing::TestWithParam<std::pair<std::string, int> > { … };
TEST_P(LocalityNameParseTest, ParsedCorrectly) { … }
INSTANTIATE_TEST_SUITE_P(…);
class SublocalityNameParseTest
: public testing::TestWithParam<std::pair<std::string, int> > { … };
TEST_P(SublocalityNameParseTest, ParsedCorrectly) { … }
INSTANTIATE_TEST_SUITE_P(…);
class AdminAreaNameParseTest
: public testing::TestWithParam<std::pair<std::string, int> > { … };
TEST_P(AdminAreaNameParseTest, ParsedCorrectly) { … }
INSTANTIATE_TEST_SUITE_P(…);
class RuleParseTest : public testing::TestWithParam<std::string> { … };
TEST_P(RuleParseTest, RegionDataParsedSuccessfully) { … }
TEST_P(RuleParseTest, AdminAreaNameTypeHasUiString) { … }
TEST_P(RuleParseTest, PostalCodeNameTypeHasUiString) { … }
TEST_P(RuleParseTest, LocalityNameTypeHasUiString) { … }
TEST_P(RuleParseTest, SublocalityNameTypeHasUiString) { … }
TEST_P(RuleParseTest, SolePostalCode) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}