| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "courgette/consecutive_range_visitor.h" | 5 #include "courgette/consecutive_range_visitor.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <string> | 9 #include <string> |
| 8 | 10 |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 12 |
| 11 namespace courgette { | 13 namespace courgette { |
| 12 | 14 |
| 13 TEST(ConsecutiveRangeVisitorTest, Basic) { | 15 TEST(ConsecutiveRangeVisitorTest, Basic) { |
| 14 std::string s = "AAAAABZZZZOO"; | 16 std::string s = "AAAAABZZZZOO"; |
| 15 ConsecutiveRangeVisitor<std::string::iterator> vis(s.begin(), s.end()); | 17 ConsecutiveRangeVisitor<std::string::iterator> vis(s.begin(), s.end()); |
| 16 EXPECT_TRUE(vis.has_more()); | 18 EXPECT_TRUE(vis.has_more()); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 63 } |
| 62 } | 64 } |
| 63 | 65 |
| 64 TEST(ConsecutiveRangeVisitorTest, Empty) { | 66 TEST(ConsecutiveRangeVisitorTest, Empty) { |
| 65 std::string s; | 67 std::string s; |
| 66 ConsecutiveRangeVisitor<std::string::iterator> vis(s.begin(), s.end()); | 68 ConsecutiveRangeVisitor<std::string::iterator> vis(s.begin(), s.end()); |
| 67 EXPECT_FALSE(vis.has_more()); | 69 EXPECT_FALSE(vis.has_more()); |
| 68 } | 70 } |
| 69 | 71 |
| 70 } // namespace courgette | 72 } // namespace courgette |
| OLD | NEW |