aboutsummaryrefslogtreecommitdiff
path: root/src/test/loopTimerTest.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-25 11:48:39 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-25 11:48:39 +0100
commit48015cd425b26eb68eb07f4e4b1adf71e81e11b1 (patch)
tree95725bd476cf92c5749e27c44c5134902dedfc66 /src/test/loopTimerTest.cpp
parentea7d7ec301968f3a542de93f487f9501b70c0cd4 (diff)
make format
Diffstat (limited to 'src/test/loopTimerTest.cpp')
-rw-r--r--src/test/loopTimerTest.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/test/loopTimerTest.cpp b/src/test/loopTimerTest.cpp
index a3b1646..327e577 100644
--- a/src/test/loopTimerTest.cpp
+++ b/src/test/loopTimerTest.cpp
@@ -1,7 +1,7 @@
#define private public
#define protected public
-#include "api/LoopManager.h"
#include "api/LoopTimer.h"
+#include "api/LoopManager.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -11,22 +11,19 @@ using namespace crepe;
class LoopTimerTest : public ::testing::Test {
public:
-LoopTimer loop_timer = LoopTimer::get_instance();
+ LoopTimer loop_timer = LoopTimer::get_instance();
+
protected:
- void SetUp() override {
- loop_timer.start();
- }
+ void SetUp() override { loop_timer.start(); }
- void TearDown() override {
-
- }
+ void TearDown() override {}
};
TEST_F(LoopTimerTest, TestDeltaTime) {
- auto start_time = std::chrono::steady_clock::now();
-
- loop_timer.update();
- double delta_time = loop_timer.get_delta_time();
+ auto start_time = std::chrono::steady_clock::now();
+
+ loop_timer.update();
+ double delta_time = loop_timer.get_delta_time();
- auto elapsed_time = std::chrono::steady_clock::now() - start_time;
- EXPECT_LE(delta_time, std::chrono::duration<double>(elapsed_time).count());
+ auto elapsed_time = std::chrono::steady_clock::now() - start_time;
+ EXPECT_LE(delta_time, std::chrono::duration<double>(elapsed_time).count());
}