mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
update tests
This commit is contained in:
parent
098b215a63
commit
aad61096d1
@ -119,10 +119,10 @@ static inline ret_t fragment_frame_buffer_write_data(fragment_frame_buffer_t* ff
|
|||||||
ret_t ret = fragment_frame_buffer_set_pixel(ffb, x, y, pixel);
|
ret_t ret = fragment_frame_buffer_set_pixel(ffb, x, y, pixel);
|
||||||
|
|
||||||
ffb->cursor_x++;
|
ffb->cursor_x++;
|
||||||
|
assert(ffb->cursor_y < ffb->win.h);
|
||||||
if (ffb->cursor_x >= ffb->win.w) {
|
if (ffb->cursor_x >= ffb->win.w) {
|
||||||
ffb->cursor_x = 0;
|
ffb->cursor_x = 0;
|
||||||
ffb->cursor_y++;
|
ffb->cursor_y++;
|
||||||
assert(ffb->cursor_y < ffb->win.h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -51,7 +51,7 @@ TEST(FragmentFrameBuffer, basic) {
|
|||||||
fragment_frame_buffer_write_data(ffb, 6);
|
fragment_frame_buffer_write_data(ffb, 6);
|
||||||
fragment_frame_buffer_end_frame(ffb);
|
fragment_frame_buffer_end_frame(ffb);
|
||||||
|
|
||||||
ASSERT_EQ(s_log, "win(4 4 3 2):01 02 03 04 05 06 ");
|
ASSERT_EQ(s_log, "win(4 4 6 5):01 02 03 04 05 06 ");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(FragmentFrameBuffer, not_large_enough) {
|
TEST(FragmentFrameBuffer, not_large_enough) {
|
||||||
@ -100,5 +100,5 @@ TEST(FragmentFrameBuffer, set) {
|
|||||||
|
|
||||||
fragment_frame_buffer_end_frame(ffb);
|
fragment_frame_buffer_end_frame(ffb);
|
||||||
|
|
||||||
ASSERT_EQ(s_log, "win(4 4 3 2):01 02 03 04 05 06 ");
|
ASSERT_EQ(s_log, "win(4 4 6 5):01 02 03 04 05 06 ");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user