Alexandre Julliard : kernel: Added a basic test for exception handling in threads.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 5 14:06:03 CST 2005


Module: wine
Branch: refs/heads/master
Commit: 45693738e69d056bd9102b407c9388599450d8ea
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=45693738e69d056bd9102b407c9388599450d8ea

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Dec  5 20:43:33 2005 +0100

kernel: Added a basic test for exception handling in threads.

---

 dlls/kernel/tests/thread.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/kernel/tests/thread.c b/dlls/kernel/tests/thread.c
index 200cdf6..444217d 100644
--- a/dlls/kernel/tests/thread.c
+++ b/dlls/kernel/tests/thread.c
@@ -119,6 +119,10 @@ static DWORD WINAPI threadFunc1(LPVOID p
    for(i=0;i<NUM_THREADS;i++) {
      while(tstruct->threadmem[i]==0) ;
    }
+
+   /* lstrlenA contains an exception handler so this makes sure exceptions work in threads */
+   ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" );
+
 /* Check that noone changed our tls memory */
    ok((int)TlsGetValue(tlsIndex)-1==tstruct->threadnum,
       "TlsGetValue failed\n");
@@ -180,6 +184,9 @@ static VOID test_CreateThread_basic(void
    DWORD i,j;
    DWORD GLE, ret;
 
+   /* lstrlenA contains an exception handler so this makes sure exceptions work in the main thread */
+   ok( lstrlenA( (char *)0xdeadbeef ) == 0, "lstrlenA: unexpected success\n" );
+
 /* Retrieve current Thread ID for later comparisons */
   curthreadId=GetCurrentThreadId();
 /* Allocate some local storage */




More information about the wine-cvs mailing list