Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
dummy-play-connection-test.cpp
Go to the documentation of this file.
1/*
2 DummyPlayConnection(Test) - create and verify a simplified test render engine setup
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 "lib/time/control.hpp"
24
25
26
27namespace steam {
28namespace play {
29namespace test {
30
31 namespace time = lib::time;
32
34//using steam::engine::test::testData;
35//using steam::engine::test::TestFrame;
36
37 using lumiera::Play;
38
40
42
43
44 /***************************************************************/
51 class DummyPlayConnection_test : public Test
52 {
53 virtual void
54 run (Arg)
55 {
57 }
58
59
60 void
62 {
63 DummyPlayer dummy;
64 CHECK (!dummy.isWired());
65
66 Play::Controller player
67 = Play::facade().perform ( dummy.getAllModelPorts()
68 , dummy.provide_testOutputSlot());
69 CHECK ( dummy.isWired());
70
71 DurationControl playDuration;
72 player.controlDuration (playDuration);
73
74 // configure the controller to playback only for a fixed time duration
75 playDuration (dummy.getPlannedTestDuration());
76
77 CHECK (!player.is_playing());
78
79 player.play(true); // hit the start button
80 CHECK (player.is_playing());
81
82 dummy.waitUntilDue(); // test helper: block waiting until planned test should be done
83
84 CHECK (!player.is_playing()); // should have returned to pause, since we've set a fixed playback duration
85 CHECK (dummy.isWired());
86
87 player.close();
88 CHECK (!dummy.isWired());
89 CHECK (dummy.gotCorrectOutput());
90 }
91 };
92
93
96
97
98
99}}} // namespace steam::play::test
void close()
deactivate this handle, so it isn't tied any longer to the associated implementation or service objec...
Definition handle.hpp:140
Frontend/Interface: controller-element to retrieve and change running time values.
Definition control.hpp:127
Continuous playback process, which has been hooked up and started with a fixed set of output slots.
void play(bool)
play/pause toggle
void controlDuration(time::Control< time::Duration > &ctrl)
Interface to the Player subsystem of Lumiera (Steam-Layer).
static lib::Depend< Play > facade
get an implementation instance of this service
Handle for a buffer for processing data, abstracting away the actual implementation.
Framework for dummy playback and rendering.
Manipulating and monitoring time entities with life changes.
Dummy and test setup of playback and rendering, omitting most of the Lumiera engine.
time::Control< time::Duration > DurationControl
DummyPlayConnection< PlayTestFrames_Strategy > DummyPlayer
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
Public access point to the playback service provided by the »play-out subsystem«
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Definition run.hpp:116