[libc++][NFC] Remove trailing whitespace from release notes
[llvm-project.git] / libcxx / test / std / depr / exception.unexpected / unexpected / unexpected.pass.cpp
blobfc49b4d5053ec4ec383c29f111489e6cdb74a036
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // REQUIRES: c++03 || c++11 || c++14
11 // test unexpected
13 #include <exception>
14 #include <cstdlib>
15 #include <cassert>
17 #include "test_macros.h"
19 void f1()
21 std::exit(0);
24 int main(int, char**)
26 std::set_unexpected(f1);
27 std::unexpected();
28 assert(false);
30 return 0;