Author SHA1 Message Date
urbanjo98912 d591cef798 small changes 2025-12-15 08:03:00 +01:00
3 changed files with 8 additions and 11 deletions
+2
View File
@@ -108,6 +108,8 @@ int main(void)
{ {
UNITY_BEGIN(); UNITY_BEGIN();
printf("\n============================\n Bintree tests\n============================\n");
RUN_TEST(test_addToTree_single_element); RUN_TEST(test_addToTree_single_element);
RUN_TEST(test_addToTree_multiple_elements_and_size); RUN_TEST(test_addToTree_multiple_elements_and_size);
RUN_TEST(test_addToTree_duplicate_detection); RUN_TEST(test_addToTree_duplicate_detection);
+2
View File
@@ -61,6 +61,8 @@ int main(void)
{ {
UNITY_BEGIN(); UNITY_BEGIN();
printf("\n============================\n Numbers tests\n============================\n");
RUN_TEST(test_createNumbers_no_null); RUN_TEST(test_createNumbers_no_null);
RUN_TEST(test_createNumbers_has_exactly_one_duplicate); RUN_TEST(test_createNumbers_has_exactly_one_duplicate);
RUN_TEST(test_createNumbers_has_correct_value_range); RUN_TEST(test_createNumbers_has_correct_value_range);
+2 -9
View File
@@ -1,12 +1,6 @@
#include "timer.h" #include "timer.h"
#ifdef __linux__ #if __APPLE__
// Defines strict posix compliance for CLOCK_MONOTONIC
#define _POSIX_C_SOURCE 199309L
#include <time.h>
#endif
#if __APPLE__ || __linux__
#include <sys/time.h> #include <sys/time.h>
static struct timespec start = {0, 0}; static struct timespec start = {0, 0};
@@ -27,8 +21,7 @@ double stopTimer()
double measuredSeconds = (double)delta_us / 1000000.; double measuredSeconds = (double)delta_us / 1000000.;
if (start.tv_nsec > 0) if(start.tv_nsec > 0) {
{
start.tv_nsec = 0; start.tv_nsec = 0;
start.tv_sec = 0; start.tv_sec = 0;
} }