@@ -171,6 +171,7 @@ TEST(RRegularAxis, GetNormalRange)
171171 static constexpr std::size_t Bins = 20 ;
172172 const RRegularAxis axis (Bins, 0 , Bins);
173173 const auto index0 = RBinIndex (0 );
174+ const auto index1 = RBinIndex (1 );
174175 const auto indexBins = RBinIndex (Bins);
175176
176177 {
@@ -188,7 +189,6 @@ TEST(RRegularAxis, GetNormalRange)
188189 }
189190
190191 {
191- const auto index1 = RBinIndex (1 );
192192 const auto index5 = RBinIndex (5 );
193193 const auto normal = axis.GetNormalRange (index1, index5);
194194 EXPECT_EQ (normal.GetBegin (), index1);
@@ -197,7 +197,6 @@ TEST(RRegularAxis, GetNormalRange)
197197 }
198198
199199 {
200- const auto index1 = RBinIndex (1 );
201200 const auto empty = axis.GetNormalRange (index1, index1);
202201 EXPECT_EQ (empty.GetBegin (), index1);
203202 EXPECT_EQ (empty.GetEnd (), index1);
@@ -211,6 +210,7 @@ TEST(RRegularAxis, GetNormalRange)
211210 EXPECT_THROW (axis.GetNormalRange (indexBins, indexBins), std::invalid_argument);
212211 EXPECT_THROW (axis.GetNormalRange (index0, overflow), std::invalid_argument);
213212 EXPECT_THROW (axis.GetNormalRange (index0, indexBins + 1 ), std::invalid_argument);
213+ EXPECT_THROW (axis.GetNormalRange (index1, index0), std::invalid_argument);
214214}
215215
216216TEST (RRegularAxis, GetFullRange)
0 commit comments