From 8aa3a496d65dc4941cd90e1d286b9bba697facff Mon Sep 17 00:00:00 2001 From: Thilo Behnke Date: Mon, 2 May 2022 13:33:35 +0200 Subject: [PATCH] issue with canvas orientation? --- pong/tests/pong_tests.rs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/pong/tests/pong_tests.rs b/pong/tests/pong_tests.rs index e1aa74d..b6bb2e4 100644 --- a/pong/tests/pong_tests.rs +++ b/pong/tests/pong_tests.rs @@ -13,31 +13,23 @@ use pong::utils::utils::{DefaultLoggerFactory, NoopLogger}; create_player(1, 10, 0, Vector::new(0., -1.)), get_bound(Bound::BOTTOM), // expected - create_player(1, 10, 120, Vector::new(0., -1.)), + create_player(1, 10, 61, Vector::new(0., -1.)), get_bound(Bound::BOTTOM) )] #[case( // given - create_player(1, 10, 119, Vector::new(0., -1.)), + create_player(1, 10, 1, Vector::new(0., -1.)), get_bound(Bound::BOTTOM), // expected - create_player(1, 10, 120, Vector::new(0., -1.)), + create_player(1, 10, 61, Vector::new(0., -1.)), get_bound(Bound::BOTTOM) )] #[case( // given - create_player(1, 10, 121, Vector::new(0., -1.)), - get_bound(Bound::BOTTOM), - // expected - create_player(1, 10, 120, Vector::new(0., -1.)), - get_bound(Bound::BOTTOM) -)] -#[case( - // given - create_player(1, 10, 600, Vector::new(0., 1.)), + create_player(1, 10, 601, Vector::new(0., 1.)), get_bound(Bound::TOP), // expected - create_player(1, 10, 480, Vector::new(0., 1.)), + create_player(1, 10, 539, Vector::new(0., 1.)), get_bound(Bound::TOP) )] #[case( @@ -45,7 +37,7 @@ use pong::utils::utils::{DefaultLoggerFactory, NoopLogger}; create_player(1, 10, 599, Vector::new(0., 1.)), get_bound(Bound::TOP), // expected - create_player(1, 10, 480, Vector::new(0., 1.)), + create_player(1, 10, 539, Vector::new(0., 1.)), get_bound(Bound::TOP) )] pub fn should_correctly_handle_player_bounds_collision(