banditcpp / bandit

Human-friendly unit testing for C++11
https://banditcpp.github.io/bandit/
Other
259 stars 37 forks source link

Iterator assertion #152

Closed MartinDelille closed 4 years ago

MartinDelille commented 4 years ago

Is there a better way to do that:

auto my_iterator =  my_list.begin();
...
AssertThat(my_iterator == my_list.end(), IsTrue());
MartinDelille commented 4 years ago

It doesn't even work.

AssertThat(my_iterator, Is().EqualTo(my_list.end)) seems fine.