13 #include <gtest/gtest.h> 29 EXPECT_EQ(2, (*iterator)(0));
30 EXPECT_EQ(0, (*iterator)(1));
34 EXPECT_EQ(3, (*iterator)(0));
35 EXPECT_EQ(1, (*iterator)(1));
39 EXPECT_EQ(4, (*iterator)(0));
40 EXPECT_EQ(2, (*iterator)(1));
55 EXPECT_EQ(4, (*iterator)(0));
56 EXPECT_EQ(2, (*iterator)(1));
60 EXPECT_EQ(3, (*iterator)(0));
61 EXPECT_EQ(1, (*iterator)(1));
65 EXPECT_EQ(2, (*iterator)(0));
66 EXPECT_EQ(1, (*iterator)(1));
71 EXPECT_FALSE(iterator.isPastEnd());
73 EXPECT_TRUE(iterator.isPastEnd());
85 EXPECT_EQ(5, (*iterator)(0));
86 EXPECT_EQ(4, (*iterator)(1));
90 EXPECT_EQ(4, (*iterator)(0));
91 EXPECT_EQ(3, (*iterator)(1));
95 EXPECT_EQ(3, (*iterator)(0));
96 EXPECT_EQ(2, (*iterator)(1));
123 map.getPosition(*iterator, point);
124 EXPECT_EQ(0, point.x());
125 EXPECT_EQ(0, point.y());
128 EXPECT_FALSE(iterator.isPastEnd());
129 map.getPosition(*iterator, point);
130 EXPECT_EQ(1, point.x());
131 EXPECT_EQ(1, point.y());
134 EXPECT_FALSE(iterator.isPastEnd());
135 map.getPosition(*iterator, point);
136 EXPECT_EQ(2, point.x());
137 EXPECT_EQ(2, point.y());
140 EXPECT_TRUE(iterator.isPastEnd());
154 map.getPosition(*iterator, point);
155 EXPECT_EQ(0, point.x());
156 EXPECT_EQ(0, point.y());
159 map.getPosition(*iterator, point);
160 EXPECT_EQ(1, point.x());
161 EXPECT_EQ(1, point.y());
164 map.getPosition(*iterator, point);
165 EXPECT_EQ(2, point.x());
166 EXPECT_EQ(2, point.y());
169 map.getPosition(*iterator, point);
170 EXPECT_EQ(3, point.x());
171 EXPECT_EQ(3, point.y());
174 map.getPosition(*iterator, point);
175 EXPECT_EQ(4, point.x());
176 EXPECT_EQ(4, point.y());
179 EXPECT_TRUE(iterator.isPastEnd());
void setGeometry(const Length &length, const double resolution, const Position &position=Position::Zero())
TEST(LineIterator, StartOutsideMap)