changeset 3266:7856dfe3a44f

More test coverage
author Sam Lantinga <slouken@libsdl.org>
date Sat, 19 Sep 2009 05:45:49 +0000
parents 8f534bf37bef
children 7690aa2f5b74
files test/testsprite2.c
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/test/testsprite2.c	Sat Sep 19 05:43:15 2009 +0000
+++ b/test/testsprite2.c	Sat Sep 19 05:45:49 2009 +0000
@@ -153,29 +153,31 @@
     SDL_RenderLine(0, 1, 0, window_h-2);
     SDL_RenderLine(window_w-1, 1, window_w-1, window_h-2);
 
-    /* Test fill */
+    /* Test fill and copy */
     SDL_SetRenderDrawColor(0xFF, 0xFF, 0xFF, 0xFF);
+    temp.x = 1;
+    temp.y = 1;
+    temp.w = sprite_w;
+    temp.h = sprite_h;
+    SDL_RenderFill(&temp);
+    SDL_RenderCopy(sprite, NULL, &temp);
     temp.x = window_w-sprite_w-1;
     temp.y = 1;
     temp.w = sprite_w;
     temp.h = sprite_h;
     SDL_RenderFill(&temp);
+    SDL_RenderCopy(sprite, NULL, &temp);
     temp.x = 1;
     temp.y = window_h-sprite_h-1;
     temp.w = sprite_w;
     temp.h = sprite_h;
     SDL_RenderFill(&temp);
-
-    /* Test copy */
-    temp.x = 1;
-    temp.y = 1;
-    temp.w = sprite_w;
-    temp.h = sprite_h;
     SDL_RenderCopy(sprite, NULL, &temp);
     temp.x = window_w-sprite_w-1;
     temp.y = window_h-sprite_h-1;
     temp.w = sprite_w;
     temp.h = sprite_h;
+    SDL_RenderFill(&temp);
     SDL_RenderCopy(sprite, NULL, &temp);
 
     /* Test diagonal lines */