#include "scb.h"Go to the source code of this file.
Defines | |
| #define | TRACE(x, args...) fprintf(stderr, "(SCB_TEST)" __FILE__ ":%d,%s() " x "\n", __LINE__, __FUNCTION__ , ##args) |
Functions | |
| void | testDoc () |
| int | main (int argc, char *argv[]) |
| #define TRACE | ( | x, | |||
| args... | ) | fprintf(stderr, "(SCB_TEST)" __FILE__ ":%d,%s() " x "\n", __LINE__, __FUNCTION__ , ##args) |
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
| void testDoc | ( | ) |
Definition at line 34 of file test.c.
00035 { 00036 // doc 00037 ScbDocPtr doc = scb_doc_new(); 00038 if (NULL == doc) 00039 { 00040 TRACE("Could not construct a scribble document!"); 00041 return; 00042 } 00043 00044 // page list 00045 ScbPagesPtr pages = scb_doc_get_pages(doc); 00046 00047 // add some pages 00048 { 00049 ScbPageId id; 00050 ScbPagePtr page = NULL; 00051 int i = 0; 00052 for(; i < 5; ++i) 00053 { 00054 scb_page_id_from_int(&id, i); 00055 page = scb_page_new(&id); 00056 scb_pages_add_page(pages, page); 00057 } 00058 scb_pages_dump(pages); 00059 } 00060 00061 scb_doc_free(doc); 00062 }

1.5.6