@@ -226,18 +226,24 @@ int main() {
226226
227227 // axis with overflow bin represents open interval
228228 {
229- axis::regular<double , def, def, op::overflow_t > a{1 , 0 , 1 };
230- BOOST_TEST_EQ (a.index (0.9 ), 0 );
231- BOOST_TEST_EQ (a.index (1 ), 1 ); // overflow bin
232- BOOST_TEST_EQ (a.index (1.1 ), 1 ); // overflow bin
229+ axis::regular<double , def, def, op::overflow_t > a{2 , 0 , 1 };
230+ BOOST_TEST_EQ (a.index (0 ), 0 );
231+ BOOST_TEST_EQ (a.index (0.49 ), 0 );
232+ BOOST_TEST_EQ (a.index (0.50 ), 1 );
233+ BOOST_TEST_EQ (a.index (0.99 ), 1 );
234+ BOOST_TEST_EQ (a.index (1 ), 2 ); // overflow bin
235+ BOOST_TEST_EQ (a.index (1.1 ), 2 ); // overflow bin
233236 }
234237
235238 // axis without overflow bin represents a closed interval
236239 {
237- axis::regular<double , def, def, op::none_t > a{1 , 0 , 1 };
238- BOOST_TEST_EQ (a.index (0.9 ), 0 );
239- BOOST_TEST_EQ (a.index (1 ), 0 ); // last ordinary bin
240- BOOST_TEST_EQ (a.index (1.1 ), 1 ); // out of range
240+ axis::regular<double , def, def, op::none_t > a{2 , 0 , 1 };
241+ BOOST_TEST_EQ (a.index (0 ), 0 );
242+ BOOST_TEST_EQ (a.index (0.49 ), 0 );
243+ BOOST_TEST_EQ (a.index (0.50 ), 1 );
244+ BOOST_TEST_EQ (a.index (0.99 ), 1 );
245+ BOOST_TEST_EQ (a.index (1 ), 1 ); // last ordinary bin
246+ BOOST_TEST_EQ (a.index (1.1 ), 2 ); // out of range
241247 }
242248
243249 // iterators
0 commit comments