#How to tests with time?

3 messages · Page 1 of 1 (latest)

limber rose
#

Hi there!

I'm starting a project with Bevy and I would like to test my systems.

My first ones are "mouse moving systems":
The setup system spawn an Avatar component with a Option<Vec2> initiated to None for target point.
In another system, left click event is catch to initiate the target point.
In a third system, if target point is Some, a the Transform of my Avatar component is translated over a Vec2 between the current position and the target point.

My problem is that I do not found any example of Testing Driven Development in Bevy to verify the position of my Avatar in the moving system.

If someone could just point me to an open sourced example, I may write a blog article to describe the whole process and/or add an example to the bevy source code.

iron trellis
#

None of these use time or anything more than the default scheduler. I think you should should be able to configure the app with the plugins you need (in this case I guess bevy::time::TimePlugin)