28#include <boost/rational.hpp>
30using boost::rational_cast;
49 const uint MAX_FRAMES = 1000;
50 const uint DIRT_GRAIN = 50;
77 GridID myGrID (randStr(8));
80 CHECK ( spec.
fps == 1);
89 CHECK (myGrid->ident.name == myGrID.
getSym());
93 int randomFrame = rani(MAX_FRAMES);
95 Time point (myGrid->timeOf (randomFrame));
96 CHECK (point == TEST_ORIGIN + randomFrame * TEST_FPS.
duration());
98 int fract = 2 + rani(DIRT_GRAIN);
99 FSecs dirt = (1/TEST_FPS) / fract;
104 CHECK (point == TEST_ORIGIN + myGrid->gridLocal(dirty));
112 CHECK (simplePALGrid);
114 cout <<
"simple PAL Grid: " << simplePALGrid->ident << endl;
116 CHECK (
Time(0,2) == simplePALGrid->timeOf(50));
117 CHECK (
Time(0,2) == simplePALGrid->timeOf(
FSecs(2)));
string const & getSym() const
Framerate specified as frames per second.
Duration duration() const
duration of one frame
static const FrameRate PAL
predefined constant for PAL framerate
basic constant internal time value.
Lumiera's internal time value datatype.
string randStr(size_t len)
create garbage string of given length
std::shared_ptr< const Grid > PGrid
boost::rational< int64_t > FSecs
rational representation of fractional seconds
The asset subsystem of the Steam-Layer.
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
bool isnil(lib::time::Duration const &dur)
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
typed symbolic and hash ID for asset-like position accounting.
A collection of frequently used helper functions to support unit testing.
To establish a reference scale for quantised time values.
a family of time value like entities and their relationships.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...