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

// Copyright (C) 2013 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 "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) {}

// Tests for parsing the postal code name.
class PostalCodeNameParseTest
    : public testing::TestWithParam<std::pair<std::string, int> > {};

// Verifies that a postal code name is parsed correctly.
TEST_P(PostalCodeNameParseTest, ParsedCorrectly) {}

// Test parsing all postal code names.
INSTANTIATE_TEST_SUITE_P();

// Tests for parsing the locality name.
class LocalityNameParseTest
    : public testing::TestWithParam<std::pair<std::string, int> > {};

// Verifies that a locality name is parsed correctly.
TEST_P(LocalityNameParseTest, ParsedCorrectly) {}

// Test parsing all locality names.
INSTANTIATE_TEST_SUITE_P();

// Tests for parsing the locality name.
class SublocalityNameParseTest
    : public testing::TestWithParam<std::pair<std::string, int> > {};

// Verifies that a sublocality name is parsed correctly.
TEST_P(SublocalityNameParseTest, ParsedCorrectly) {}

// Test parsing all sublocality names.
INSTANTIATE_TEST_SUITE_P();

// Tests for parsing the administrative area name.
class AdminAreaNameParseTest
    : public testing::TestWithParam<std::pair<std::string, int> > {};

// Verifies that an administrative area name is parsed correctly.
TEST_P(AdminAreaNameParseTest, ParsedCorrectly) {}

// Test parsing all administrative area names.
INSTANTIATE_TEST_SUITE_P();

// Tests for rule parsing.
class RuleParseTest : public testing::TestWithParam<std::string> {};

// Verifies that a region data can be parsed successfully.
TEST_P(RuleParseTest, RegionDataParsedSuccessfully) {}

// Verifies that the admin area name type corresponds to a UI string.
TEST_P(RuleParseTest, AdminAreaNameTypeHasUiString) {}

// Verifies that the postal code name type corresponds to a UI string.
TEST_P(RuleParseTest, PostalCodeNameTypeHasUiString) {}

// Verifies that the locality name type corresponds to a UI string.
TEST_P(RuleParseTest, LocalityNameTypeHasUiString) {}

// Verifies that the sublocality name type corresponds to a UI string.
TEST_P(RuleParseTest, SublocalityNameTypeHasUiString) {}

// Verifies that the sole postal code is correctly recognized and copied.
TEST_P(RuleParseTest, SolePostalCode) {}

// Test parsing all region data.
INSTANTIATE_TEST_SUITE_P();

// Test parsing the default rule.
INSTANTIATE_TEST_SUITE_P();

}  // namespace