Lumiera  0.pre.03
»edit your freedom«
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 
21 #include "steam/play/timings.hpp"
22 #include "lib/time/timevalue.hpp"
23 //#include "steam/engine/buffhandle.hpp"
24 //#include "steam/engine/testframe.hpp"
25 //#include "lib/time/control.hpp"
26 
27 
28 
29 namespace steam {
30 namespace play {
31 namespace test {
32 
33  using lib::time::Time;
34  using lib::time::Duration;
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  {
57  define_basicTimingConstraints();
58  }
59 
60 
61  void
62  define_basicTimingConstraints()
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 
79  LAUNCHER (TimingConstraints_test, "unit play");
80 
81 
82 
83 }}} // namespace steam::play::test
Definition: run.hpp:40
Framerate specified as frames per second.
Definition: timevalue.hpp:655
Generic frame timing specification.
Definition: timings.hpp:86
Steam-Layer implementation namespace root.
Lumiera&#39;s internal time value datatype.
Definition: timevalue.hpp:299
Simplistic test class runner.
How to define a timing specification or constraint.
Duration is the internal Lumiera time metric.
Definition: timevalue.hpp:468
a family of time value like entities and their relationships.
static const FrameRate PAL
predefined constant for PAL framerate
Definition: timevalue.hpp:671