Changeset 3557 for libcaca/trunk/tests
- Timestamp:
- Jul 19, 2009, 11:12:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/tests/dirty.cpp
r3556 r3557 197 197 caca_fill_box(cv2, 0, 0, 2, 1, 'x'); 198 198 199 caca_blit(cv, 1, 1, cv2, NULL);200 i = caca_get_dirty_rect_count(cv);201 CPPUNIT_ASSERT_EQUAL(i, 1);202 caca_get_dirty_rect(cv, 0, &dx, &dy, &dw, &dh);203 204 199 /* Check that blitting a canvas make a dirty rectangle 205 200 * only for modified lines */ 201 202 caca_blit(cv, 1, 1, cv2, NULL); 203 i = caca_get_dirty_rect_count(cv); 204 CPPUNIT_ASSERT_EQUAL(i, 1); 205 caca_get_dirty_rect(cv, 0, &dx, &dy, &dw, &dh); 206 206 207 CPPUNIT_ASSERT(dx == 1); 207 208 CPPUNIT_ASSERT(dy == 1); 208 209 CPPUNIT_ASSERT(dw >= 2); 209 210 CPPUNIT_ASSERT(dh == 1); 211 212 caca_clear_canvas(cv); 213 caca_clear_dirty_rect_list(cv); 214 215 /* Check that blitting a canvas make a dirty rectangle 216 * only for modified chars when we have a mask */ 217 218 caca_blit(cv, 1, 1, cv2, cv2); 219 i = caca_get_dirty_rect_count(cv); 220 CPPUNIT_ASSERT_EQUAL(i, 1); 221 caca_get_dirty_rect(cv, 0, &dx, &dy, &dw, &dh); 222 223 CPPUNIT_ASSERT(dx == 1); 224 CPPUNIT_ASSERT(dy == 1); 225 CPPUNIT_ASSERT(dw == 2); 226 CPPUNIT_ASSERT(dh == 1); 210 227 } 211 228
Note: See TracChangeset
for help on using the changeset viewer.