int main ( const int argc, const char * const * const argv ) /*@globals errno, fileSystem, stderr, stdout@*/ /*@modifies errno, fileSystem, stderr, stdout@*/ { int verbose = 0, i; for (i = 1; i < argc; ++i) { const char * const arg = argv[i]; if (0 == strcmp("-v", arg)) { verbose = 1; } } if (test_line (verbose) && test_lines (verbose) && test_lineread (verbose) && test_lang (verbose)) { (void)puts("SUCCESS"); return EXIT_SUCCESS; } else { (void)fputs("FAILURE\n", stderr); return EXIT_FAILURE; } }
void test_gfx(int argc, char **argv) { int delay = 1000; Screen* screen = switch_to_vga(); fill_screen(screen, color_make(2, 0, 0)); draw_button(screen); sleep(delay); test_lines(screen); sleep(delay); test_circles(screen); sleep(delay); test_rects(screen); sleep(delay); test_triangles(screen); sleep(delay); test_text(screen); sleep(delay); draw_julia(screen); sleep(delay); draw_mandelbrot(screen); sleep(delay); gfx_teardown(screen); switch_to_text(); }
int main () { test_json("Array", "[ 0, 1, 2, 4]"); test_json("Empty list", " []"); test_json("Empty list", "{\"label\": [], \"label2\": []}"); test_json("Empty object", "{\"l1\": {}, \"l2\": {}}"); printf("Basic test\n"); test_basic (); printf("Basic test\n"); test_lines (); return 0; }