2
* simple simple testsuite program
3
* Copyright (c) 2007 Sam Hocevar <sam@zoy.org>
8
* This program is free software. It comes without any warranty, to
9
* the extent permitted by applicable law. You can redistribute it
10
* and/or modify it under the terms of the Do What The Fuck You Want
11
* To Public License, Version 2, as published by Sam Hocevar. See
12
* http://sam.zoy.org/wtfpl/COPYING for more details.
17
#if !defined(__KERNEL__)
31
fprintf(stderr, "test #%i failed\n", (tests)); \
35
int main(int argc, char *argv[])
38
int tests = 0, passed = 0;
40
cv = caca_create_canvas(0, 0);
41
caca_put_char(cv, 0, 0, 'x');
42
TEST(caca_get_char(cv, 0, 0) != 'x');
44
caca_set_canvas_size(cv, 1, 1);
45
TEST(caca_get_char(cv, 0, 0) != 'x');
46
TEST(caca_get_char(cv, 0, 0) == ' ');
48
caca_put_char(cv, 0, 0, 'y');
49
TEST(caca_get_char(cv, 0, 0) == 'y');
51
caca_set_canvas_size(cv, 1000, 1000);
52
TEST(caca_get_canvas_width(cv) == 1000);
54
caca_put_char(cv, 999, 999, 'z');
55
TEST(caca_get_char(cv, 999, 999) == 'z');
59
fprintf(stderr, "%i tests, %i errors\n", tests, tests - passed);