Skip to content

Commit 54c841d

Browse files
committed
Exercise subtraction between iterators in the unit tests
Reason: This was missing. And we forgot a friend declaration for the corresponding operator-(), which will be added with the next commit.
1 parent 7c4dbfa commit 54c841d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/bitset_test.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ struct bitset_test
248248
BOOST_TEST( *( 1 + b.begin() ) == b[ 1 ] );
249249
BOOST_TEST( *( b.end() - 1 ) == b[ b.size() - 1 ] );
250250
}
251+
252+
BOOST_TEST( b.end() - b.begin() == static_cast< std::ptrdiff_t >( b.size() ) );
251253
}
252254

253255
static void

0 commit comments

Comments
 (0)