27#include <boost/lexical_cast.hpp>
29using boost::lexical_cast;
58 return 1 +
rani(100'000);
61 return 10 * lexical_cast<int> (arg[1]);
88 QuTime qVal (org,
"my_simple_grid");
101 cout <<
"TEST rawTime:"<<
Time{org} << endl;
105 CHECK ( qVal == org);
106 CHECK ( fixQ.get() ==
PQuant(qVal).get());
127 cout << timecodeValue.describe()
128 <<
" time = "<< timecodeValue.getTime()
129 <<
" code = "<< timecodeValue
139 QuTime palVal (org,
"my_simple_grid");
140 QuTime ntscVal (org,
"my_alternate_grid");
142 CHECK (org == palVal);
143 CHECK (org == ntscVal);
147 CHECK (palNr <= ntscNr);
159 QuTime funny (org,
"special_funny_grid");
163 CHECK (0 == smpte.frames);
164 CHECK (cnt % 60 == smpte.secs);
Simple stand-alone Quantiser implementation based on a constant sized gird.
A frame counting timecode value.
static const FrameRate NTSC
grid aligned time specification, referring to a specific scale.
bool supports() const
does our implicit time grid support building that timecode format?
format::Traits< FMT >::TimeCode formatAs() const
create new time code instance, then castInto
Classical Timecode value reminiscent to SMPTE format.
basic constant internal time value.
Lumiera's internal time value datatype.
void showTimeCode(TC timecodeValue)
int random_or_get(Arg arg)
void checkGridBinding(TimeValue org)
virtual void run(Arg arg)
void checkMultipleGrids(TimeValue org)
void checkSimpleUsage(TimeValue org)
void check_theFullStory(TimeValue org)
std::shared_ptr< const Quantiser > PQuant
boost::rational< int64_t > FSecs
rational representation of fractional seconds
Implementation namespace for support and library code.
int rani(uint bound=_iBOUND())
Test runner and basic definitions for tests.
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
bool isnil(lib::time::Duration const &dur)
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
A collection of frequently used helper functions to support unit testing.
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
To establish a reference scale for quantised time values.
Support library to represent grid-aligned time specifications This is part of Lumiera's time and time...
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...