13 #include <gtest/gtest.h> 28 EXPECT_EQ(2, (*iterator)(0));
29 EXPECT_EQ(0, (*iterator)(1));
33 EXPECT_EQ(3, (*iterator)(0));
34 EXPECT_EQ(1, (*iterator)(1));
38 EXPECT_EQ(4, (*iterator)(0));
39 EXPECT_EQ(2, (*iterator)(1));
53 EXPECT_EQ(4, (*iterator)(0));
54 EXPECT_EQ(2, (*iterator)(1));
58 EXPECT_EQ(3, (*iterator)(0));
59 EXPECT_EQ(1, (*iterator)(1));
63 EXPECT_EQ(2, (*iterator)(0));
64 EXPECT_EQ(1, (*iterator)(1));
69 EXPECT_FALSE(iterator.isPastEnd());
71 EXPECT_TRUE(iterator.isPastEnd());
82 EXPECT_EQ(5, (*iterator)(0));
83 EXPECT_EQ(4, (*iterator)(1));
87 EXPECT_EQ(4, (*iterator)(0));
88 EXPECT_EQ(3, (*iterator)(1));
92 EXPECT_EQ(3, (*iterator)(0));
93 EXPECT_EQ(2, (*iterator)(1));
121 map.getPosition(*iterator, point);
122 EXPECT_EQ(0, point.x());
123 EXPECT_EQ(0, point.y());
126 EXPECT_FALSE(iterator.isPastEnd());
127 map.getPosition(*iterator, point);
128 EXPECT_EQ(1, point.x());
129 EXPECT_EQ(1, point.y());
132 EXPECT_FALSE(iterator.isPastEnd());
133 map.getPosition(*iterator, point);
134 EXPECT_EQ(2, point.x());
135 EXPECT_EQ(2, point.y());
138 EXPECT_TRUE(iterator.isPastEnd());
151 map.getPosition(*iterator, point);
152 EXPECT_EQ(0, point.x());
153 EXPECT_EQ(0, point.y());
156 map.getPosition(*iterator, point);
157 EXPECT_EQ(1, point.x());
158 EXPECT_EQ(1, point.y());
161 map.getPosition(*iterator, point);
162 EXPECT_EQ(2, point.x());
163 EXPECT_EQ(2, point.y());
166 map.getPosition(*iterator, point);
167 EXPECT_EQ(3, point.x());
168 EXPECT_EQ(3, point.y());
171 map.getPosition(*iterator, point);
172 EXPECT_EQ(4, point.x());
173 EXPECT_EQ(4, point.y());
176 EXPECT_TRUE(iterator.isPastEnd());
void setGeometry(const Length &length, const double resolution, const Position &position=Position::Zero())
TEST(LineIterator, StartOutsideMap)