Test files: Replace BOOST_TRY/CATCH family macros with BOOST_INTERPROCESS_TRY/CATCH

This commit is contained in:
Ion Gaztañaga
2024-08-03 22:47:34 +02:00
parent 865573a821
commit 4a011349db
36 changed files with 218 additions and 222 deletions

View File

@@ -131,22 +131,18 @@ int main ()
if(!CheckEqual(userlist, stdlist, heaplist)) return 1;
std::vector<int> aux_vect;
#if !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
aux_vect.assign(50, -1);
userlist->assign(aux_vect.begin(), aux_vect.end());
heaplist->assign(aux_vect.begin(), aux_vect.end());
stdlist->assign(aux_vect.begin(), aux_vect.end());
if(!CheckEqual(userlist, stdlist, heaplist)) return 1;
#endif
userlist->sort();
heaplist->sort();
stdlist->sort();
if(!CheckEqual(userlist, stdlist, heaplist)) return 1;
#if !BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
aux_vect.assign(50, 0);
#endif
userlist->insert(userlist->begin(), aux_vect.begin(), aux_vect.end());
heaplist->insert(heaplist->begin(), aux_vect.begin(), aux_vect.end());
stdlist->insert(stdlist->begin(), aux_vect.begin(), aux_vect.end());
@@ -204,12 +200,12 @@ int main ()
delete stdlist;
//Fill heap buffer until is full
BOOST_TRY{
BOOST_INTERPROCESS_TRY{
while(1){
heaplist->insert(heaplist->end(), 0);
}
}
BOOST_CATCH(boost::interprocess::bad_alloc &){} BOOST_CATCH_END
BOOST_INTERPROCESS_CATCH(boost::interprocess::bad_alloc &){} BOOST_INTERPROCESS_CATCH_END
MyHeapList::size_type heap_list_size = heaplist->size();
@@ -237,12 +233,12 @@ int main ()
}
//Fill user buffer until is full
BOOST_TRY{
BOOST_INTERPROCESS_TRY{
while(1){
userlist->insert(userlist->end(), 0);
}
}
BOOST_CATCH(boost::interprocess::bad_alloc &){} BOOST_CATCH_END
BOOST_INTERPROCESS_CATCH(boost::interprocess::bad_alloc &){} BOOST_INTERPROCESS_CATCH_END
MyUserList::size_type user_list_size = userlist->size();