#include <libaddressinput/localization.h>
#include <libaddressinput/address_data.h>
#include <libaddressinput/address_field.h>
#include <libaddressinput/address_problem.h>
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "grit.h"
#include "messages.h"
namespace {
AddressData;
AddressField;
INVALID_MESSAGE_ID;
Localization;
COUNTRY;
ADMIN_AREA;
LOCALITY;
DEPENDENT_LOCALITY;
SORTING_CODE;
POSTAL_CODE;
STREET_ADDRESS;
ORGANIZATION;
RECIPIENT;
MISSING_REQUIRED_FIELD;
UNKNOWN_VALUE;
INVALID_FORMAT;
MISMATCHING_VALUE;
USES_P_O_BOX;
class LocalizationTest : public testing::TestWithParam<int> { … };
const char kValidMessage[] = …;
std::string GetValidMessage(int message_id) { … }
TEST_P(LocalizationTest, ValidStringGetterCanBeUsed) { … }
TEST_P(LocalizationTest, DefaultStringIsNotEmpty) { … }
TEST_P(LocalizationTest, NoNewline) { … }
TEST_P(LocalizationTest, NoDoubleSpace) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(LocalizationTest, InvalidMessageIsEmptyString) { … }
TEST(LocalizationGetErrorMessageTest, MissingRequiredPostalCode) { … }
TEST(LocalizationGetErrorMessageTest, MissingRequiredZipCode) { … }
TEST(LocalizationGetErrorMessageTest, MissingRequiredOtherFields) { … }
TEST(LocalizationGetErrorMessageTest, UnknownValueOtherFields) { … }
TEST(LocalizationGetErrorMessageTest, InvalidFormatPostalCode) { … }
TEST(LocalizationGetErrorMessageTest, InvalidFormatZipCode) { … }
TEST(LocalizationGetErrorMessageTest, MismatchingValuePostalCode) { … }
TEST(LocalizationGetErrorMessageTest, MismatchingValueZipCode) { … }
TEST(LocalizationGetErrorMessageTest, UsesPOBoxOtherFields) { … }
}