1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-10-31 13:07:14 +00:00

Add missing tests for new vm_screen functions

This commit is contained in:
Peter Evans 2018-01-17 15:16:12 -06:00
parent 53f40ff960
commit c8dbf1c84c

View File

@ -68,3 +68,18 @@ Test(vm_screen, ycoords)
cr_assert_eq(screen->ycoords, 234);
}
Test(vm_screen, key_pressed)
{
screen->key_pressed = true;
cr_assert_eq(vm_screen_key_pressed(screen), true);
screen->key_pressed = false;
cr_assert_eq(vm_screen_key_pressed(screen), false);
}
Test(vm_screen, last_key)
{
screen->last_key = 'e';
cr_assert_eq(vm_screen_last_key(screen), 'e');
screen->last_key = 'y';
cr_assert_eq(vm_screen_last_key(screen), 'y');
}