From 1d10408bd176bdd8d6a7992283f68f43d13fd539 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 30 Mar 2022 15:13:46 -0600 Subject: [PATCH] temporal: add some relatively useless code to one of the timeline test functions --- libs/temporal/test/TimelineTest.cc | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/libs/temporal/test/TimelineTest.cc b/libs/temporal/test/TimelineTest.cc index c32cae8153..01122cac3d 100644 --- a/libs/temporal/test/TimelineTest.cc +++ b/libs/temporal/test/TimelineTest.cc @@ -1,6 +1,7 @@ +#include #include -#include "temporal/bbt_time.h" +#include "temporal/timeline.h" #include "TimelineTest.h" @@ -11,6 +12,30 @@ using namespace Temporal; void TimelineTest::createTest() { + using namespace Temporal; + using namespace std; + + srandom (time (0)); + + vector times; + + for (int n = 0; n < 32767; ++n) { + times.push_back (timepos_t (random() % 32120321)); + } + + uint32_t lessthan = 0; + uint32_t greaterthan = 0; + + for (vector::iterator t = times.begin(); t != times.end(); ++t) { + if ((*t) + timepos_t (random() % 20207) < timepos_t (2299307)) { + lessthan++; + } else { + greaterthan++; + } + } + + std::cerr << "LT " << lessthan << " GT " << greaterthan << std::endl; + } void