diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-25 12:09:30 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-25 12:09:30 +0100 |
commit | 336a8442f32fa9a4fa79e995ae7ec4617a840944 (patch) | |
tree | 1a66a157c4b9630f8c627cf889419d95164109ee | |
parent | 3d8251cd6b65a1e80002518ea48b1a74d91f6ab3 (diff) |
removed gameLoop example
-rw-r--r-- | src/test/loopTimerTest.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/test/loopTimerTest.cpp b/src/test/loopTimerTest.cpp deleted file mode 100644 index 327e577..0000000 --- a/src/test/loopTimerTest.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#define private public -#define protected public -#include "api/LoopTimer.h" -#include "api/LoopManager.h" -#include <gmock/gmock.h> -#include <gtest/gtest.h> - -using namespace std; -using namespace std::chrono_literals; -using namespace crepe; - -class LoopTimerTest : public ::testing::Test { -public: - LoopTimer loop_timer = LoopTimer::get_instance(); - -protected: - void SetUp() override { loop_timer.start(); } - - 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 elapsed_time = std::chrono::steady_clock::now() - start_time; - EXPECT_LE(delta_time, std::chrono::duration<double>(elapsed_time).count()); -} |