From d0d553a655aa7280e8496e717b53478c95580b50 Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 19 Dec 2019 12:10:18 +0000 Subject: [PATCH] .upptst git-svn-id: svn://ultimatepp.org/upp/trunk@13772 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- upptst/PdbTests/main.cpp | 17 +++++++++++++++-- upptst/TimedSemaphoreCV/TimedSemaphoreCV.cpp | 15 +++++++++++++++ upptst/TimedSemaphoreCV/TimedSemaphoreCV.upp | 9 +++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 upptst/TimedSemaphoreCV/TimedSemaphoreCV.cpp create mode 100644 upptst/TimedSemaphoreCV/TimedSemaphoreCV.upp diff --git a/upptst/PdbTests/main.cpp b/upptst/PdbTests/main.cpp index 9af299ea4..822c9c61b 100644 --- a/upptst/PdbTests/main.cpp +++ b/upptst/PdbTests/main.cpp @@ -39,7 +39,7 @@ struct Val : Moveable { Val DeRef(Val val_v) { DDUMP(&val_v); - val_v.ref--; + val_v.ref--; // todo; DBGHELP problem here val_v.rvalue = false; return val_v; } @@ -71,9 +71,22 @@ void Test3(String *ptr_s) DDUMP(ptr_s); DUMP(*ptr_s); } - GUI_APP_MAIN { + { + Vector x; + for(int i = 0; i < 100000; i++) + x.Add(i); + int *h = x; + h = NULL; + } + { + Tuple h; + int q[] = { 1, 2, 3, 4, 5 }; + h.b = q; + h.a = 123456789; + h.b = NULL; + } { Value a = Rectf(1, 1, 1, 1); Value b = Rectf(1, 2, 3, 4); diff --git a/upptst/TimedSemaphoreCV/TimedSemaphoreCV.cpp b/upptst/TimedSemaphoreCV/TimedSemaphoreCV.cpp new file mode 100644 index 000000000..20df8312e --- /dev/null +++ b/upptst/TimedSemaphoreCV/TimedSemaphoreCV.cpp @@ -0,0 +1,15 @@ +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + // this is just compilation check: + + Semaphore s; + s.Wait(1000); + + Mutex m; + ConditionVariable cv; + cv.Wait(m, 1000); +} diff --git a/upptst/TimedSemaphoreCV/TimedSemaphoreCV.upp b/upptst/TimedSemaphoreCV/TimedSemaphoreCV.upp new file mode 100644 index 000000000..7da2f7b80 --- /dev/null +++ b/upptst/TimedSemaphoreCV/TimedSemaphoreCV.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + TimedSemaphoreCV.cpp; + +mainconfig + "" = ""; +