Changeset View
Changeset View
Standalone View
Standalone View
src/compat/glibcxx_sanity.cpp
Show All 28 Lines | bool sanity_test_list(unsigned int size) { | ||||
while (!test.empty()) { | while (!test.empty()) { | ||||
if (test.back() != test.size()) return false; | if (test.back() != test.size()) return false; | ||||
test.pop_back(); | test.pop_back(); | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
} // anon namespace | } // namespace | ||||
// trigger: string::at(x) on an empty string to trigger | // trigger: string::at(x) on an empty string to trigger | ||||
// __throw_out_of_range_fmt. | // __throw_out_of_range_fmt. | ||||
// test: force std::string to throw an out_of_range exception. Verify that | // test: force std::string to throw an out_of_range exception. Verify that | ||||
// it's caught correctly. | // it's caught correctly. | ||||
bool sanity_test_range_fmt() { | bool sanity_test_range_fmt() { | ||||
std::string test; | std::string test; | ||||
try { | try { | ||||
Show All 12 Lines |