Add rotation unit tests

This commit is contained in:
2025-08-23 13:33:44 -05:00
parent 8d75a40475
commit 031a487fb5

View File

@@ -714,11 +714,33 @@ mod test {
#[test]
fn rotate_clockwise() {
todo!();
let shape = Card {
cells: NW_TRIANGLE,
..Default::default()
};
let expected = Card {
cells: NE_TRIANGLE,
..Default::default()
};
let result = shape.rotate(RotationDir::Clockwise);
assert_eq!(result, expected);
}
#[test]
fn rotate_counter_clockwise() {
todo!();
let shape = Card {
cells: NE_TRIANGLE,
..Default::default()
};
let expected = Card {
cells: NW_TRIANGLE,
..Default::default()
};
let result = shape.rotate(RotationDir::CounterClockwise);
assert_eq!(result, expected);
}
}