mirror of https://git.sr.ht/~kikoodx/kble
Update movement tests.
This commit is contained in:
parent
178d6e53df
commit
bd5943afe8
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue