1
0
mirror of https://github.com/fluencelabs/redis synced 2025-06-24 06:21:32 +00:00
Files
deps
hiredis
jemalloc
bin
build-aux
doc
include
m4
msvc
scripts
src
test
include
integration
cpp
basic.cpp
MALLOCX_ARENA.c
aligned_alloc.c
allocated.c
extent.c
extent.sh
mallocx.c
mallocx.sh
overflow.c
posix_memalign.c
rallocx.c
sdallocx.c
thread_arena.c
thread_tcache_enabled.c
xallocx.c
xallocx.sh
src
stress
unit
test.sh.in
.appveyor.yml
.autom4te.cfg
.gitattributes
.gitignore
.travis.yml
COPYING
ChangeLog
INSTALL.md
Makefile.in
README
TUNING.md
VERSION
autogen.sh
config.stamp.in
configure
configure.ac
jemalloc.pc.in
run_tests.sh
linenoise
lua
Makefile
README.md
update-jemalloc.sh
src
tests
utils
.gitignore
00-RELEASENOTES
BUGS
CONTRIBUTING
COPYING
INSTALL
MANIFESTO
Makefile
README.md
redis.conf
runtest
runtest-cluster
runtest-moduleapi
runtest-sentinel
sentinel.conf
redis/deps/jemalloc/test/integration/cpp/basic.cpp

26 lines
429 B
C++
Raw Normal View History

2018-05-24 18:21:13 +02:00
#include <memory>
#include "test/jemalloc_test.h"
TEST_BEGIN(test_basic) {
auto foo = new long(4);
assert_ptr_not_null(foo, "Unexpected new[] failure");
delete foo;
// Test nullptr handling.
foo = nullptr;
delete foo;
auto bar = new long;
assert_ptr_not_null(bar, "Unexpected new failure");
delete bar;
// Test nullptr handling.
bar = nullptr;
delete bar;
}
TEST_END
int
main() {
return test(
test_basic);
}