1
Window / Programmatically sending events to sf::Window
« on: November 28, 2015, 08:28:51 pm »
Hello,
I am using boost::test as a testing framework and am trying to create some tests for how my application will be processing user input to a window. The handling of each individual event is already under a test as they are not part of the same procedure that polls the events, so that's not my concern. I just want to make sure that the actual procedure that has the sf::Window::pollEvent() loop is also tested.
However, I am having trouble determining how one can programmatically send an event to a sf::Window, such as sf::Event::Resized or sf::Event::KeyPressed, which can then be processed by my pollEvent() procedure. Any ideas?
If I need to clarify more then let me know.
I am using boost::test as a testing framework and am trying to create some tests for how my application will be processing user input to a window. The handling of each individual event is already under a test as they are not part of the same procedure that polls the events, so that's not my concern. I just want to make sure that the actual procedure that has the sf::Window::pollEvent() loop is also tested.
However, I am having trouble determining how one can programmatically send an event to a sf::Window, such as sf::Event::Resized or sf::Event::KeyPressed, which can then be processed by my pollEvent() procedure. Any ideas?
If I need to clarify more then let me know.