diff options
| author | Eric Fiselier <eric@efcs.ca> | 2014-11-19 01:45:12 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2014-11-19 01:45:12 +0000 |
| commit | 13d123ccf76e235e687b06d3ab6943d2fb5e2059 (patch) | |
| tree | 42b337abee952eb43f21ded6291048dac9999a69 /libcxx/test/language.support/support.start.term/quick_exit_check2.fail.cpp | |
| parent | 638bb4a2a3ed7ed779f62096de361d41034fffd4 (diff) | |
| download | bcm5719-llvm-13d123ccf76e235e687b06d3ab6943d2fb5e2059.tar.gz bcm5719-llvm-13d123ccf76e235e687b06d3ab6943d2fb5e2059.zip | |
Cleanup quick_exit tests and get them passing in C++03.
Wrap the original test in _LIBCPP_HAS_QUICK_EXIT so it only runs when we have
quick_exit and add two new tests that check that when _LIBCPP_HAS_QUICK_EXIT
is not defined then no definition of std::at_quick_exit or std::quick_exit are
available.
llvm-svn: 222298
Diffstat (limited to 'libcxx/test/language.support/support.start.term/quick_exit_check2.fail.cpp')
| -rw-r--r-- | libcxx/test/language.support/support.start.term/quick_exit_check2.fail.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libcxx/test/language.support/support.start.term/quick_exit_check2.fail.cpp b/libcxx/test/language.support/support.start.term/quick_exit_check2.fail.cpp new file mode 100644 index 00000000000..39591413682 --- /dev/null +++ b/libcxx/test/language.support/support.start.term/quick_exit_check2.fail.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// + +// test that referencing quick_exit when _LIBCPP_HAS_QUICK_EXIT is not defined +// results in a compile error. + +#include <cstdlib> + +void f() {} + +int main() +{ +#ifndef _LIBCPP_HAS_QUICK_EXIT + std::quick_exit(0); +#else +#error +#endif +} |

