1#include <memory>
2
3#include "test/jemalloc_test.h"
4
5TEST_BEGIN(test_failing_alloc) {
6 bool saw_exception = false;
7 try {
8 /* Too big of an allocation to succeed. */
9 void *volatile ptr = ::operator new((size_t)-1);
10 (void)ptr;
11 } catch (...) {
12 saw_exception = true;
13 }
14 expect_true(saw_exception, "Didn't get a failure");
15}
16TEST_END
17
18int
19main(void) {
20 return test(
21 test_failing_alloc);
22}
23
24

source code of slint/target/debug/build/tikv-jemalloc-sys-3c56044a4b6b6661/out/build/test/integration/cpp/infallible_new_false.cpp