Skip to content

Commit 466b40a

Browse files
committed
Add unit test for cbegin/cend
1 parent 57a6351 commit 466b40a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/base_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,23 @@ void iterator_constructor_and_assign_test() {
1717

1818
circular_buffer<MyInteger> cb(4, 3);
1919
circular_buffer<MyInteger>::iterator it = cb.begin();
20+
circular_buffer<MyInteger>::const_iterator cit2 = cb.cbegin();
2021
circular_buffer<MyInteger>::iterator itCopy;
2122
itCopy = it;
2223
it = it;
2324
circular_buffer<MyInteger>::const_iterator cit;
2425
cit = it;
2526
circular_buffer<MyInteger>::const_iterator end1 = cb.end();
2627
circular_buffer<MyInteger>::const_iterator end2 = end1;
28+
circular_buffer<MyInteger>::const_iterator end3 = cb.cend();
2729

2830
BOOST_TEST(itCopy == it);
2931
BOOST_TEST(cit == it);
3032
BOOST_TEST(end1 == end2);
3133
BOOST_TEST(it != end1);
3234
BOOST_TEST(cit != end2);
35+
BOOST_TEST(cit2 == it);
36+
BOOST_TEST(end3 == end1);
3337
}
3438

3539
void iterator_reference_test() {

0 commit comments

Comments
 (0)