@@ -2,7 +2,10 @@ | |||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I$(top_srcdir)/caca -DDATADIR=\"$(pkgdatadir)\" | AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I$(top_srcdir)/caca -DDATADIR=\"$(pkgdatadir)\" | ||||
noinst_PROGRAMS = blit colors demo demo0 dithering event export font font2tga frames fullwidth gamma hsv input spritedit swallow text transform truecolor unicode import | |||||
noinst_PROGRAMS = all blit colors demo demo0 dithering event export font font2tga frames fullwidth gamma hsv input spritedit swallow text transform truecolor unicode import | |||||
all_SOURCES = all.c | |||||
all_LDADD = ../caca/libcaca.la ../cucul/libcucul.la | |||||
blit_SOURCES = blit.c | blit_SOURCES = blit.c | ||||
blit_LDADD = ../caca/libcaca.la ../cucul/libcucul.la | blit_LDADD = ../caca/libcaca.la ../cucul/libcucul.la | ||||
@@ -0,0 +1,47 @@ | |||||
/* | |||||
* all full libcaca API test | |||||
* Copyright (c) 2006 Sam Hocevar <sam@zoy.org> | |||||
* All Rights Reserved | |||||
* | |||||
* $Id$ | |||||
* | |||||
* This program is free software; you can redistribute it and/or | |||||
* modify it under the terms of the Do What The Fuck You Want To | |||||
* Public License, Version 2, as published by Sam Hocevar. See | |||||
* http://sam.zoy.org/wtfpl/COPYING for more details. | |||||
*/ | |||||
#include "config.h" | |||||
#include "common.h" | |||||
#if !defined(__KERNEL__) | |||||
# include <stdio.h> | |||||
#endif | |||||
#include "cucul.h" | |||||
#include "caca.h" | |||||
#define ITER 1000 | |||||
int main(int argc, char *argv[]) | |||||
{ | |||||
cucul_canvas_t *cv; | |||||
unsigned int i, w, h; | |||||
/* cucul_create_canvas */ | |||||
fprintf(stderr, "testing cucul_create_canvas()\n"); | |||||
for(i = 0; i < ITER; i++) | |||||
{ | |||||
w = cucul_rand(1, 1000); | |||||
h = cucul_rand(1, 1000); | |||||
cv = cucul_create_canvas(w, h); | |||||
cucul_put_char(cv, w - 1, h - 1, 'x'); | |||||
if(cucul_get_char(cv, w - 1, h - 1) != 'x') | |||||
fprintf(stderr, " failed (%ux%u)\n", w, h); | |||||
cucul_free_canvas(cv); | |||||
} | |||||
fprintf(stderr, "all tests passed\n"); | |||||
return 0; | |||||
} | |||||
@@ -14,9 +14,6 @@ | |||||
#include "config.h" | #include "config.h" | ||||
#include "common.h" | #include "common.h" | ||||
#if !defined(__KERNEL__) | #if !defined(__KERNEL__) | ||||
# if defined(HAVE_INTTYPES_H) | |||||
# include <inttypes.h> | |||||
# endif | |||||
# include <stdio.h> | # include <stdio.h> | ||||
# include <string.h> | # include <string.h> | ||||
#endif | #endif | ||||