OLD | NEW |
1 // Copyright (C) 2014 Google Inc. | 1 // Copyright (C) 2014 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, |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include <algorithm> | 25 #include <algorithm> |
26 #include <sstream> | 26 #include <sstream> |
27 #include <string> | 27 #include <string> |
28 | 28 |
29 #include <gtest/gtest.h> | 29 #include <gtest/gtest.h> |
30 | 30 |
31 #include "address_validator_test.h" | 31 #include "address_validator_test.h" |
32 #include "fake_downloader.h" | 32 #include "fake_downloader.h" |
33 #include "fake_storage.h" | 33 #include "fake_storage.h" |
34 #include "util/json.h" | 34 #include "util/json.h" |
35 #include "util/string_util.h" | 35 #include "util/string_split.h" |
36 | 36 |
37 namespace i18n { | 37 namespace i18n { |
38 namespace addressinput { | 38 namespace addressinput { |
39 | 39 |
40 namespace { | 40 namespace { |
41 class AddressProblemEqualsString | 41 class AddressProblemEqualsString |
42 : public std::binary_function<AddressProblem, std::string, bool> { | 42 : public std::binary_function<AddressProblem, std::string, bool> { |
43 public: | 43 public: |
44 bool operator()(const AddressProblem& ap, const std::string& ep) const { | 44 bool operator()(const AddressProblem& ap, const std::string& ep) const { |
45 std::ostringstream oss; | 45 std::ostringstream oss; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 SplitString(countries_str, '~', &countries); | 201 SplitString(countries_str, '~', &countries); |
202 | 202 |
203 for (std::vector<std::string>::const_iterator it = countries.begin(); | 203 for (std::vector<std::string>::const_iterator it = countries.begin(); |
204 it != countries.end(); ++it) { | 204 it != countries.end(); ++it) { |
205 TestCountry(*it); | 205 TestCountry(*it); |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 } // addressinput | 209 } // addressinput |
210 } // i18n | 210 } // i18n |
OLD | NEW |