Author: hyperion
Date: Mon Dec 29 22:04:51 2008
New Revision: 38461
URL:
http://svn.reactos.org/svn/reactos?rev=38461&view=rev
Log:
modified tests/pseh2/psehtest.c
finally_13 test re-enabled, as it doesn't crash anymore
finally_14 test fixed. Now we know how exceptions thrown in a __finally are supposed to
be handled
PSEH test suite now has 91 tests and passes all of them with both GCC and Visual C++
Modified:
trunk/rostests/tests/pseh2/psehtest.c
Modified: trunk/rostests/tests/pseh2/psehtest.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/pseh2/psehtest.c?re…
==============================================================================
--- trunk/rostests/tests/pseh2/psehtest.c [iso-8859-1] (original)
+++ trunk/rostests/tests/pseh2/psehtest.c [iso-8859-1] Mon Dec 29 22:04:51 2008
@@ -1457,7 +1457,6 @@
return ret == return_positive() + return_one() + return_one();
}
-#if 0
static int test_finally_13_ret;
static
@@ -1550,11 +1549,12 @@
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- test_finally_14_ret = return_zero();
- }
- _SEH2_END;
-
- test_finally_14_ret = return_zero();
+ if(test_finally_14_ret == return_positive() + return_one() + return_one())
+ test_finally_14_ret += return_one();
+ }
+ _SEH2_END;
+
+ test_finally_14_ret = return_arg(test_finally_14_ret);
}
DEFINE_TEST(finally_14)
@@ -1567,17 +1567,16 @@
{
ret = return_arg(ret);
test_finally_14_helper();
- ret = return_zero();
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- ret = return_positive();
- }
- _SEH2_END;
-
- return ret == return_positive() && test_finally_14_ret == return_positive() +
return_one() + return_one();
-}
-#endif
+ ret = return_positive();
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ ret = return_zero();
+ }
+ _SEH2_END;
+
+ return ret == return_positive() && test_finally_14_ret == return_positive() +
return_one() + return_one() + return_one();
+}
//}}}
/* _SEH2_GetExceptionInformation() *///{{{
@@ -2418,10 +2417,8 @@
USE_TEST(finally_10),
USE_TEST(finally_11),
USE_TEST(finally_12),
- #if 0
USE_TEST(finally_13),
USE_TEST(finally_14),
- #endif
USE_TEST(xpointers_1),
USE_TEST(xpointers_2),