OLD | NEW |
1 // Copyright (C) 2013 Google Inc. | 1 // Copyright (C) 2013 Google Inc. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
14 | 14 |
15 #include "rule.h" | 15 #include "rule.h" |
16 | 16 |
17 #include <libaddressinput/address_field.h> | 17 #include <libaddressinput/address_field.h> |
18 | 18 |
19 #include <string> | 19 #include <string> |
20 #include <utility> | 20 #include <utility> |
21 #include <vector> | 21 #include <vector> |
22 | 22 |
23 #include <gtest/gtest.h> | 23 #include <gtest/gtest.h> |
24 | 24 |
25 #include "messages.h" | 25 #include "grit/libaddressinput_strings.h" |
26 #include "region_data_constants.h" | 26 #include "region_data_constants.h" |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 using i18n::addressinput::AddressField; | 30 using i18n::addressinput::AddressField; |
31 using i18n::addressinput::ADMIN_AREA; | 31 using i18n::addressinput::ADMIN_AREA; |
32 using i18n::addressinput::COUNTRY; | 32 using i18n::addressinput::COUNTRY; |
33 using i18n::addressinput::LOCALITY; | 33 using i18n::addressinput::LOCALITY; |
34 using i18n::addressinput::ORGANIZATION; | 34 using i18n::addressinput::ORGANIZATION; |
35 using i18n::addressinput::POSTAL_CODE; | 35 using i18n::addressinput::POSTAL_CODE; |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 previous_line_has_single_field = line_it->size() == 1; | 425 previous_line_has_single_field = line_it->size() == 1; |
426 } | 426 } |
427 } | 427 } |
428 | 428 |
429 // Test parsing all region data. | 429 // Test parsing all region data. |
430 INSTANTIATE_TEST_CASE_P( | 430 INSTANTIATE_TEST_CASE_P( |
431 AllRulesTest, RuleParseTest, | 431 AllRulesTest, RuleParseTest, |
432 testing::ValuesIn(RegionDataConstants::GetRegionCodes())); | 432 testing::ValuesIn(RegionDataConstants::GetRegionCodes())); |
433 | 433 |
434 } // namespace | 434 } // namespace |
OLD | NEW |