OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/basictypes.h" | 5 #include <stddef.h> |
| 6 |
| 7 #include "base/macros.h" |
6 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
7 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
8 #include "components/query_parser/query_parser.h" | 10 #include "components/query_parser/query_parser.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
10 | 12 |
11 namespace query_parser { | 13 namespace query_parser { |
12 | 14 |
13 class QueryParserTest : public testing::Test { | 15 class QueryParserTest : public testing::Test { |
14 public: | 16 public: |
15 struct TestData { | 17 struct TestData { |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 ASSERT_EQ(data[i].word_count, results.size()); | 169 ASSERT_EQ(data[i].word_count, results.size()); |
168 EXPECT_EQ(data[i].w1, base::UTF16ToUTF8(results[0])); | 170 EXPECT_EQ(data[i].w1, base::UTF16ToUTF8(results[0])); |
169 if (results.size() == 2) | 171 if (results.size() == 2) |
170 EXPECT_EQ(data[i].w2, base::UTF16ToUTF8(results[1])); | 172 EXPECT_EQ(data[i].w2, base::UTF16ToUTF8(results[1])); |
171 if (results.size() == 3) | 173 if (results.size() == 3) |
172 EXPECT_EQ(data[i].w3, base::UTF16ToUTF8(results[2])); | 174 EXPECT_EQ(data[i].w3, base::UTF16ToUTF8(results[2])); |
173 } | 175 } |
174 } | 176 } |
175 | 177 |
176 } // namespace query_parser | 178 } // namespace query_parser |
OLD | NEW |