blob: 92d4d38e272bbb9183d7de0bc67be09c44e33a00 [file] [log] [blame]
Howard Hinnant3e519522010-05-11 19:42:16 +00001//===----------------------------------------------------------------------===//
2//
Howard Hinnant5b08a8a2010-05-11 21:36:01 +00003// The LLVM Compiler Infrastructure
Howard Hinnant3e519522010-05-11 19:42:16 +00004//
Howard Hinnant412dbeb2010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnant3e519522010-05-11 19:42:16 +00007//
8//===----------------------------------------------------------------------===//
Howard Hinnantb5a4c50a2010-08-22 00:31:12 +00009
Eric Fiselier2a1bfa92017-02-17 03:25:08 +000010// REQUIRES: c++98 || c++03 || c++11 || c++14
11
Howard Hinnant3e519522010-05-11 19:42:16 +000012// test unexpected
13
14#include <exception>
15#include <cstdlib>
16#include <cassert>
17
18void f1()
19{
20 std::exit(0);
21}
22
23int main()
24{
25 std::set_unexpected(f1);
26 std::unexpected();
27 assert(false);
28}