1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // REQUIRES: c++98 || c++03 || c++11 || c++14
12 // test set_unexpected
28 std::unexpected_handler old = std::set_unexpected(f1);
29 // verify there is a previous unexpected handler
31 // verify f1 was replace with f2
32 assert(std::set_unexpected(f2) == f1);
33 // verify calling original unexpected handler calls terminate
34 std::set_terminate(f3);