Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
More test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 19, 2009
1 parent 30b43e4 commit 26b5756
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/testsprite2.c
Expand Up @@ -153,29 +153,31 @@ MoveSprites(SDL_WindowID window, SDL_TextureID sprite)
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 = window_w-sprite_w-1;
temp.x = 1;
temp.y = 1;
temp.w = sprite_w;
temp.h = sprite_h;
SDL_RenderFill(&temp);
temp.x = 1;
temp.y = window_h-sprite_h-1;
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);

/* Test copy */
SDL_RenderCopy(sprite, NULL, &temp);
temp.x = 1;
temp.y = 1;
temp.y = window_h-sprite_h-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 = window_h-sprite_h-1;
temp.w = sprite_w;
temp.h = sprite_h;
SDL_RenderFill(&temp);
SDL_RenderCopy(sprite, NULL, &temp);

/* Test diagonal lines */
Expand Down

0 comments on commit 26b5756

Please sign in to comment.