summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-03-05 21:02:23 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-03-05 21:56:56 +0100
commita56a8cc899dc90701f1690051da4e4318e95566c (patch)
treec3ac0b91176c8e92e054df9703b1cb49b0bce532
parent036251d1fa388fc7b381643e06e65c988ba33def (diff)
test: remove dead/useless code
-rw-r--r--src/timer-test.cpp18
-rw-r--r--test/app.cpp1
-rw-r--r--test/app.hpp1
-rw-r--r--test/time.cpp28
4 files changed, 0 insertions, 48 deletions
diff --git a/src/timer-test.cpp b/src/timer-test.cpp
deleted file mode 100644
index 5c764da0..00000000
--- a/src/timer-test.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "timer.hpp"
-
-namespace floormat {
-
-namespace {
-
-constexpr uint64_t MAX{18446744073709551615ULL} , HALF{9223372036854775808ULL};
-static_assert(sizeof MAX == 8);
-static_assert(MAX == (uint64_t)-1);
-static_assert(HALF + (HALF - 1) == MAX);
-static_assert(MAX - HALF == HALF - 1);
-static_assert((HALF-1)*2 == MAX - 1);
-
-// todo!
-
-} // namespace
-
-} // namespace floormat
diff --git a/test/app.cpp b/test/app.cpp
index 8bccfbbd..70c46b8b 100644
--- a/test/app.cpp
+++ b/test/app.cpp
@@ -54,7 +54,6 @@ int test_app::exec()
FM_TEST(test_critter),
FM_TEST(test_raycast),
FM_TEST(test_json),
- FM_TEST(test_time),
FM_TEST(test_loader),
FM_TEST(test_region),
FM_TEST(test_wall_atlas),
diff --git a/test/app.hpp b/test/app.hpp
index e7db04cb..4f6597d9 100644
--- a/test/app.hpp
+++ b/test/app.hpp
@@ -43,7 +43,6 @@ struct test_app final : private FM_APPLICATION
static void test_saves();
static void test_serializer1();
static void test_tile_iter();
- static void test_time();
static void test_wall_atlas();
static void test_wall_atlas2();
diff --git a/test/time.cpp b/test/time.cpp
deleted file mode 100644
index dac8a2e4..00000000
--- a/test/time.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "app.hpp"
-#include "src/timer.hpp"
-#include <cstdio>
-#include <thread>
-#include <mg/TimeStl.h>
-
-namespace floormat {
-
-using namespace std::chrono_literals;
-
-void test_app::test_time()
-{
-#if 0
- constexpr auto to_ms = [](Ns dt) { return Time::to_seconds(dt); };
- Timer::maybe_start();
-
- Debug{} << "";
- auto t1 = Time::now();
- std::this_thread::sleep_for(8ms);
- auto t2 = Time::now();
- Debug{} << "- foo1" << to_ms(t2 - t1);
- Debug{} << "- foo2" << to_ms(Time::now() - t1);
- Debug{} << "- foo3" << to_ms(Timer::since_epoch());
- std::fputc('\t', stdout);
-#endif
-}
-
-} // namespace floormat