• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // test set_terminate
11 
12 #include <exception>
13 #include <cstdlib>
14 #include <cassert>
15 
f1()16 void f1() {}
f2()17 void f2() {}
18 
main()19 int main()
20 {
21     std::set_terminate(f1);
22     assert(std::set_terminate(f2) == f1);
23 }
24