| 9 | #include "test.h" |
| 10 | |
| 11 | FL_TEST_FILE(FL_FILEPATH) { |
| 12 | using namespace fl; |
| 13 | using namespace fl::video; |
| 14 | FL_TEST_CASE("FrameTracker basic frame advancement") { |
| 15 | FrameTracker tracker(1.0f); // 1fps == 1000ms per frame |
| 16 | uint32_t currentFrame, nextFrame; |
| 17 | uint8_t amountOfNextFrame; |
| 18 | |
| 19 | //tracker.reset(1000); // start at time 1000ms |
| 20 | |
| 21 | // Shift the time to 500 ms or 50% of the first frame |
| 22 | tracker.get_interval_frames(500, ¤tFrame, &nextFrame, &amountOfNextFrame); |
| 23 | FL_CHECK(currentFrame == 0); |
| 24 | FL_CHECK(nextFrame == 1); |
| 25 | FL_CHECK(amountOfNextFrame == 127); |
| 26 | } |
| 27 | |
| 28 | } // FL_TEST_FILE |
nothing calls this directly
no test coverage detected