From 7b5e23ce70a878da5d8d075cf3e6cadfa337c044 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 22 May 2019 09:26:46 +0000 Subject: [PATCH] .upptst git-svn-id: svn://ultimatepp.org/upp/trunk@13332 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- upptst/Realloc/Realloc.cpp | 19 +++++++++++++++++++ upptst/Realloc/Realloc.upp | 9 +++++++++ 2 files changed, 28 insertions(+) create mode 100644 upptst/Realloc/Realloc.cpp create mode 100644 upptst/Realloc/Realloc.upp diff --git a/upptst/Realloc/Realloc.cpp b/upptst/Realloc/Realloc.cpp new file mode 100644 index 000000000..fd2bdc205 --- /dev/null +++ b/upptst/Realloc/Realloc.cpp @@ -0,0 +1,19 @@ +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + void *ptr = MemoryAlloc(400); + DDUMP(TryRealloc(ptr, 420)); + DDUMP(TryRealloc(ptr, 1000)); + + MemoryFree(ptr); + + ptr = MemoryAlloc(2000); + DDUMP(TryRealloc(ptr, 4000)); + DDUMP(TryRealloc(ptr, 200)); + DDUMP(TryRealloc(ptr, 200000)); + + MemoryFree(ptr); +} diff --git a/upptst/Realloc/Realloc.upp b/upptst/Realloc/Realloc.upp new file mode 100644 index 000000000..8bb3fe36f --- /dev/null +++ b/upptst/Realloc/Realloc.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + Realloc.cpp; + +mainconfig + "" = ""; +