annotate src/testcase.c @ 24:e598bc809c0f

No more flash when animation. 1. Add a buffer surface. 2. Draw on the surface 3. Copy content of buffer surface to XLib surface.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 03 Aug 2008 02:08:31 +0800
parents 79e9edf4c00a
children c986e45c1e91
rev   line source
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
1 #include <CUnit/Basic.h>
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
2
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
3 extern CU_pSuite get_tools_suite(void);
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
4 extern CU_pSuite get_coord_suite(void);
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
5 extern CU_pSuite get_geo_suite(void);
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
6 extern CU_pSuite get_shape_path_suite(void);
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
7 extern CU_pSuite get_redraw_man_suite(void);
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
8
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
9 int
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
10 main(int argc, char * const argv[]) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
11 CU_pSuite suite;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
12
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
13 if(CU_initialize_registry() != CUE_SUCCESS)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
14 return CU_get_error();
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
15
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
16 suite = get_tools_suite();
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
17 if(suite == NULL)
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
18 return CU_get_error();
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
19 suite = get_coord_suite();
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
20 if(suite == NULL)
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
21 return CU_get_error();
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
22 suite = get_geo_suite();
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
23 if(suite == NULL)
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
24 return CU_get_error();
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
25 suite = get_shape_path_suite();
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
26 if(suite == NULL)
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
27 return CU_get_error();
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
28 suite = get_redraw_man_suite();
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
29 if(suite == NULL)
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
30 return CU_get_error();
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
31
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
32 CU_basic_set_mode(CU_BRM_VERBOSE);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
33 CU_basic_run_tests();
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
34 CU_cleanup_registry();
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
35
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
36 return CU_get_error();
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
37 }