summaryrefslogtreecommitdiff
path: root/src/unit_tests.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-07-17 22:29:46 +1000
committerMaxime Coste <mawww@kakoune.org>2024-07-21 00:50:02 +1000
commita5ba9bb45f368d88a42f08e4d3134e408f81ab05 (patch)
tree96898ec3519d2704fd7e17864aab725abff236d7 /src/unit_tests.cc
parent011283e4d2579d905738ef8684972071faad1b7e (diff)
Disable UnitTest fully in non KAK_DEBUG builds
The code was still compiled and stored in the release executable, this reduces the optimized binary size.
Diffstat (limited to 'src/unit_tests.cc')
-rw-r--r--src/unit_tests.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/unit_tests.cc b/src/unit_tests.cc
index 7c77d508..1f63ff47 100644
--- a/src/unit_tests.cc
+++ b/src/unit_tests.cc
@@ -43,6 +43,7 @@ UnitTest test_diff{[]()
}};
+#ifdef KAK_DEBUG
UnitTest* UnitTest::list = nullptr;
void UnitTest::run_all_tests()
@@ -50,5 +51,6 @@ void UnitTest::run_all_tests()
for (const UnitTest* test = UnitTest::list; test; test = test->next)
test->func();
}
+#endif
}