Chrysalis - Renderer Test Coverage


renderer/
File: renderer/include/BaseAnimatedRenderer.h
Date: 2026-08-27 18:35:31
Lines:
0/15
0.0%
Functions:
0/3
0.0%
Branches:
0/12
0.0%
Decisions:
0/2
0.0%
Calls:
0/78
0.0%

Line Branch Decision Call Exec Source
1 #ifndef CHRYSALIS_BASEANIMATEDRENDERER_H
2 #define CHRYSALIS_BASEANIMATEDRENDERER_H
3
4 #include <chrono>
5
6 #include "BaseRenderer.h"
7
8 namespace Chrysalis {
9 template<typename D>
10 class BaseAnimatedRenderer: public BaseRenderer<D> {
11 protected:
12
0/19
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
✗ Call 14 not invoked.
✗ Call 15 not invoked.
✗ Call 16 not invoked.
✗ Call 17 not invoked.
✗ Call 18 not invoked.
✗ explicit BaseAnimatedRenderer(D* data): BaseRenderer<D>(data) {}
13
14 ✗ void complete() {
15
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ isCompleted_ = true;
16 ✗ }
17 virtual void prepareNextFrame(int64_t startTime, int64_t previousFrameTime, int64_t currentFrameTime) = 0;
18 public:
19 ✗ bool animate() {
20
0/2
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ const auto now = clock::now();
21
0/11
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ const int64_t currentTime = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count();
22
23
0/2
✗ Decision 'true' not taken.
✗ Decision 'false' not taken.
0/3
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ if (isCompleted_) {
24
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ startTime_ = currentTime;
25
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ isCompleted_ = false;
26
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ time_ = currentTime;
27 }
28
0/15
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ Call 5 not invoked.
✗ Call 6 not invoked.
✗ Call 7 not invoked.
✗ Call 8 not invoked.
✗ Call 9 not invoked.
✗ Call 10 not invoked.
✗ Call 11 not invoked.
✗ Call 12 not invoked.
✗ Call 13 not invoked.
✗ Call 14 not invoked.
✗ prepareNextFrame(startTime_, time_, currentTime);
29
0/4
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ time_ = currentTime;
30
0/5
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ Call 3 not invoked.
✗ Call 4 not invoked.
✗ BaseRenderer<D>::upload();
31
0/3
✗ Call 0 not invoked.
✗ Call 1 not invoked.
✗ Call 2 not invoked.
✗ return !isCompleted_;
32 }
33 private:
34 using clock = std::chrono::steady_clock;
35
36 int64_t time_ = 0;
37 int64_t startTime_ = 0;
38 bool isCompleted_ = true;
39 };
40 }
41
42 #endif //CHRYSALIS_BASEANIMATEDRENDERER_H
43