chromium/third_party/libaddressinput/src/cpp/test/address_validator_test.cc

// Copyright (C) 2014 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <libaddressinput/address_validator.h>

#include <libaddressinput/address_data.h>
#include <libaddressinput/address_field.h>
#include <libaddressinput/address_problem.h>
#include <libaddressinput/callback.h>
#include <libaddressinput/null_storage.h>
#include <libaddressinput/ondemand_supplier.h>
#include <libaddressinput/preload_supplier.h>

#include <memory>
#include <string>

#include <gtest/gtest.h>

#include "testdata_source.h"

namespace {

AddressData;
AddressValidator;
BuildCallback;
FieldProblemMap;
NullStorage;
OndemandSupplier;
PreloadSupplier;
TestdataSource;

ADMIN_AREA;
COUNTRY;
DEPENDENT_LOCALITY;
LOCALITY;
POSTAL_CODE;
STREET_ADDRESS;

INVALID_FORMAT;
MISMATCHING_VALUE;
MISSING_REQUIRED_FIELD;
UNEXPECTED_FIELD;
UNKNOWN_VALUE;
UNSUPPORTED_FIELD;

class ValidatorWrapper {};

class OndemandValidatorWrapper : public ValidatorWrapper {};

class PreloadValidatorWrapper : public ValidatorWrapper {};

class AddressValidatorTest
    : public testing::TestWithParam<ValidatorWrapper* (*)()> {};

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

TEST_P(AddressValidatorTest, EmptyAddress) {}

TEST_P(AddressValidatorTest, InvalidCountry) {}

TEST_P(AddressValidatorTest, ValidAddressUS) {}

TEST_P(AddressValidatorTest, InvalidAddressUS) {}

TEST_P(AddressValidatorTest, ValidAddressCH) {}

TEST_P(AddressValidatorTest, InvalidAddressCH) {}

TEST_P(AddressValidatorTest, ValidPostalCodeMX) {}

TEST_P(AddressValidatorTest, MismatchingPostalCodeMX) {}

TEST_P(AddressValidatorTest, ValidateFilter) {}

TEST_P(AddressValidatorTest, ValidateClearsProblems) {}

TEST_P(AddressValidatorTest, ValidKanjiAddressJP) {}

TEST_P(AddressValidatorTest, ValidLatinAddressJP) {}

TEST_P(AddressValidatorTest, ValidAddressBR) {}

TEST_P(AddressValidatorTest, ValidAddressCA_en) {}

TEST_P(AddressValidatorTest, ValidAddressCA_fr) {}

}  // namespace