aboutsummaryrefslogtreecommitdiff
path: root/tests/sdl_surface_refcount.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sdl_surface_refcount.c')
-rw-r--r--tests/sdl_surface_refcount.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/sdl_surface_refcount.c b/tests/sdl_surface_refcount.c
index 4e9b4896..c4314ebf 100644
--- a/tests/sdl_surface_refcount.c
+++ b/tests/sdl_surface_refcount.c
@@ -1,14 +1,15 @@
#include <SDL.h>
+#include <stdio.h>
int main(int argc, char *argv[])
{
- SDL_Init(SDL_INIT_VIDEO);
- SDL_Surface *screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE);
- SDL_Surface *reference = screen;
+ SDL_Surface* surface = SDL_CreateRGBSurface(SDL_SWSURFACE, 10, 10, 32,
+ 0, 0, 0, 0);
+ SDL_Surface *reference = surface;
reference->refcount++;
- SDL_FreeSurface(screen);
+ SDL_FreeSurface(surface);
SDL_FreeSurface(reference);
- int result = 1;
+ int result = surface->refcount;
REPORT_RESULT();
return 0;
}