Last active
September 15, 2017 21:01
-
-
Save JNeiger/2c8615e3e9e74396099dfcd5d637bee9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEST(WindowEvaluator, test_bug) { | |
SystemState state; | |
OurRobot* obstacleBot = state.self[0]; | |
obstacleBot->visible = true; | |
obstacleBot->pos = Point(0, 3.5); | |
Segment ourGoalSegment( | |
Point(Field_Dimensions::Current_Dimensions.GoalWidth() / 2.0, 0), | |
Point(-Field_Dimensions::Current_Dimensions.GoalWidth() / 2.0, 0)); | |
WindowEvaluator winEval(&state); | |
WindowingResult result = | |
winEval.eval_pt_to_seg(Point(0, 4), ourGoalSegment); | |
auto& windows = result.first; | |
// there should be no windows since the opponent robot is in the middle of the entire shot | |
EXPECT_NE(1, windows.size()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment