Andrew Nguyen : gdi32/tests: Uncomment and enhance a Win9x-specific Restore /SaveDC test.
Alexandre Julliard
julliard at winehq.org
Tue Jun 1 12:12:45 CDT 2010
Module: wine
Branch: master
Commit: 682f0dcf1a8e121461dd98af7d04285ead067812
URL: http://source.winehq.org/git/wine.git/?a=commit;h=682f0dcf1a8e121461dd98af7d04285ead067812
Author: Andrew Nguyen <anguyen at codeweavers.com>
Date: Tue Jun 1 08:03:11 2010 -0500
gdi32/tests: Uncomment and enhance a Win9x-specific Restore/SaveDC test.
---
dlls/gdi32/tests/dc.c | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c
index 193832c..687a98f 100644
--- a/dlls/gdi32/tests/dc.c
+++ b/dlls/gdi32/tests/dc.c
@@ -162,15 +162,35 @@ static void test_savedc(void)
ret = RestoreDC(hdc, 3);
ok(!ret, "ret = %d\n", ret);
- /* Under win98 the following two succeed and both clear the save stack
+ /* Under Win9x the following RestoreDC call succeeds and clears the save stack. */
+ ret = RestoreDC(hdc, -3);
+ ok(!ret ||
+ broken(ret), /* Win9x */
+ "ret = %d\n", ret);
+
+ /* Trying to clear an empty save stack fails. */
ret = RestoreDC(hdc, -3);
ok(!ret, "ret = %d\n", ret);
+
+ ret = SaveDC(hdc);
+ ok(ret == 3 ||
+ broken(ret == 1), /* Win9x */
+ "ret = %d\n", ret);
+
+ /* Under Win9x the following RestoreDC call succeeds and clears the save stack. */
+ ret = RestoreDC(hdc, 0);
+ ok(!ret ||
+ broken(ret), /* Win9x */
+ "ret = %d\n", ret);
+
+ /* Trying to clear an empty save stack fails. */
ret = RestoreDC(hdc, 0);
ok(!ret, "ret = %d\n", ret);
- */
ret = RestoreDC(hdc, 1);
- ok(ret, "ret = %d\n", ret);
+ ok(ret ||
+ broken(!ret), /* Win9x */
+ "ret = %d\n", ret);
DeleteDC(hdc);
}
More information about the wine-cvs
mailing list