Home | History | Annotate | Download | only in tests
      1 #include <cassert>
      2 #include <cstdlib>
      3 #include <exception>
      4 
      5 void expected_terminate() {
      6   exit(0);
      7 }
      8 
      9 int main() {
     10   std::set_terminate(expected_terminate);
     11   try {
     12     std::unexpected();
     13     assert(false);
     14   } catch (...) {
     15     assert(false);
     16   }
     17   assert(false);
     18   return 1;
     19 }
     20