Update movement tests.

This commit is contained in:
KikooDX 2021-01-29 12:32:19 +01:00
parent 178d6e53df
commit bd5943afe8
1 changed files with 5 additions and 5 deletions

View File

@ -94,21 +94,21 @@ pub fn move_down_right(cursor: *Vec2, n: u32, exclusive_selection: bool) Selecti
test "move left" {
var cursor = Vec2.init(42, 51);
move_left(&cursor, 2, false);
_ = move_left(&cursor, 2, false);
expect(cursor.x == 40);
move_left(&cursor, 38, false);
_ = move_left(&cursor, 38, false);
expect(cursor.x == 2);
move_left(&cursor, 7548748948487, false);
_ = move_left(&cursor, maxIntVec2, false);
expect(cursor.x == 0);
}
test "move right" {
var cursor = Vec2.init(564, 42);
move_right(&cursor, 51, false);
_ = move_right(&cursor, 51, false);
expect(cursor.x == 615);
move_right(&cursor, 51204758045045, false);
_ = move_right(&cursor, maxIntVec2, false);
expect(cursor.x == maxIntVec2);
}