Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
timing-constraints-test.cpp
Go to the documentation of this file.
1/*
2 TimingConstraints(Test) - verify timing constraint specifications
3
4 Copyright (C)
5 2012, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
19#include "lib/test/run.hpp"
20
23//#include "steam/engine/buffhandle.hpp"
24//#include "steam/engine/testframe.hpp"
25//#include "lib/time/control.hpp"
26
27
28
29namespace steam {
30namespace play {
31namespace test {
32
33 using lib::time::Time;
36
37//using steam::engine::BuffHandle;
38//using steam::engine::test::testData;
39//using steam::engine::test::TestFrame;
40
41//using lumiera::Play;
42
43//typedef time::Control<time::Duration> DurationControl;
44//
45//typedef DummyPlayConnection<PlayTestFrames_Strategy> DummyPlayer;
46
47
48 /***************************************************************/
52 class TimingConstraints_test : public Test
53 {
54 virtual void
55 run (Arg)
56 {
58 }
59
60
61 void
63 {
64 Timings timings (FrameRate::PAL);
65
66 Time t(0,10);
67 Duration lengthPAL (1, FrameRate::PAL);
68
69 CHECK (timings.getOrigin() == Time::ZERO);
70 CHECK (timings.getFrameDurationAt(t) == lengthPAL);
71 CHECK (ASAP == timings.playbackUrgency);
72#if false
73#endif
74 }
75 };
76
77
80
81
82
83}}} // namespace steam::play::test
Duration is the internal Lumiera time metric.
Framerate specified as frames per second.
static const FrameRate PAL
predefined constant for PAL framerate
Lumiera's internal time value datatype.
static const Time ZERO
Generic frame timing specification.
Definition timings.hpp:87
Time getOrigin() const
Definition timings.cpp:114
Duration getFrameDurationAt(TimeValue refPoint) const
Definition timings.cpp:128
PlaybackUrgency playbackUrgency
Definition timings.hpp:91
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Definition run.hpp:116
a family of time value like entities and their relationships.
How to define a timing specification or constraint.