[5/7] rpcrt4/tests: Wrap a try/except block around tests

Dan Hipschman dsh at linux.ucla.edu
Mon Jun 25 20:25:57 CDT 2007


This patch wraps the rpcrt4 tests for widl in a try/except block.  While
these macros are useless in wine (at the moment, anyway), they're helpful
when running the tests on windows.  If the tests crash due to an exception,
we can see the code that was raised.

---
 dlls/rpcrt4/tests/server.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index 5437e71..ee555c7 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -677,7 +677,17 @@ START_TEST(server)
   progname = argv[0];
 
   if (argc == 3)
-    client(argv[2]);
+  {
+    RpcTryExcept
+    {
+      client(argv[2]);
+    }
+    RpcExcept(TRUE)
+    {
+      trace("Exception %d\n", RpcExceptionCode());
+    }
+    RpcEndExcept
+  }
   else
     server();
 }



More information about the wine-patches mailing list