Mercurial > MadButterfly
annotate src/testcase.c @ 489:23c7667b3ec0 Android_Skia
Fix a potential bug when destroy a rdman.
When a rdman is dirty, free shapes and coords works specially.
Objects are append to a free list. They are not real freed until
rdman being clean. redraw_man_destroy() free shapes and coords with
free functions of them. If rdman is dirty when destroy it, objects
would be leaked. The changeset make rdman clean before free shapes
and coords to make objects being freed correctly.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 22 Nov 2009 20:41:27 +0800 |
parents | 1a923ea699c1 |
children | 586e50f82c1f |
rev | line source |
---|---|
1 | 1 #include <CUnit/Basic.h> |
2 | |
12 | 3 extern CU_pSuite get_tools_suite(void); |
1 | 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 | 7 extern CU_pSuite get_redraw_man_suite(void); |
50 | 8 extern CU_pSuite get_animate_suite(void); |
73
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
50
diff
changeset
|
9 extern CU_pSuite get_observer_suite(void); |
235 | 10 extern CU_pSuite get_event_suite(void); |
410
1a923ea699c1
shape_stext.c, now, is unittested.
Thinker K.F. Li <thinker@branda.to>
parents:
235
diff
changeset
|
11 extern CU_pSuite get_stext_suite(void); |
1 | 12 |
13 int | |
14 main(int argc, char * const argv[]) { | |
15 CU_pSuite suite; | |
16 | |
17 if(CU_initialize_registry() != CUE_SUCCESS) | |
18 return CU_get_error(); | |
19 | |
12 | 20 suite = get_tools_suite(); |
21 if(suite == NULL) | |
22 return CU_get_error(); | |
23 suite = get_coord_suite(); | |
24 if(suite == NULL) | |
25 return CU_get_error(); | |
26 suite = get_geo_suite(); | |
27 if(suite == NULL) | |
28 return CU_get_error(); | |
29 suite = get_shape_path_suite(); | |
30 if(suite == NULL) | |
31 return CU_get_error(); | |
32 suite = get_redraw_man_suite(); | |
33 if(suite == NULL) | |
34 return CU_get_error(); | |
50 | 35 suite = get_animate_suite(); |
36 if(suite == NULL) | |
37 return CU_get_error(); | |
73
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
50
diff
changeset
|
38 suite = get_observer_suite(); |
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
50
diff
changeset
|
39 if(suite == NULL) |
9ab15ebc9061
Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents:
50
diff
changeset
|
40 return CU_get_error(); |
235 | 41 suite = get_event_suite(); |
42 if(suite == NULL) | |
43 return CU_get_error(); | |
410
1a923ea699c1
shape_stext.c, now, is unittested.
Thinker K.F. Li <thinker@branda.to>
parents:
235
diff
changeset
|
44 suite = get_stext_suite(); |
1a923ea699c1
shape_stext.c, now, is unittested.
Thinker K.F. Li <thinker@branda.to>
parents:
235
diff
changeset
|
45 if(suite == NULL) |
1a923ea699c1
shape_stext.c, now, is unittested.
Thinker K.F. Li <thinker@branda.to>
parents:
235
diff
changeset
|
46 return CU_get_error(); |
1 | 47 |
48 CU_basic_set_mode(CU_BRM_VERBOSE); | |
49 CU_basic_run_tests(); | |
50 CU_cleanup_registry(); | |
51 | |
52 return CU_get_error(); | |
53 } |