Add DynamicState::find_if()

This commit is contained in:
Joakim Hove
2019-04-02 07:23:28 +02:00
parent 0d172c9a1c
commit 9e40f3be4f
2 changed files with 13 additions and 0 deletions

View File

@@ -248,6 +248,10 @@ BOOST_AUTO_TEST_CASE( find ) {
BOOST_CHECK_EQUAL( state.find( 300 ) , 2 );
BOOST_CHECK_EQUAL( state.find( 400 ) , 4 );
BOOST_CHECK_EQUAL( state.find( 500 ) , -1 );
auto pred = [] (const int& elm) { return elm == 400 ;};
BOOST_CHECK_EQUAL( state.find_if(pred), 4);
}