Lumiera  0.pre.03
»edit your freedom«
node-basic-test.cpp
Go to the documentation of this file.
1 /*
2  NodeBasic(Test) - unit test covering render node basic lifecycle and usage
3 
4  Copyright (C) Lumiera.org
5  2009, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
28 #include "lib/test/run.hpp"
35 //#include "lib/format-cout.hpp"
36 //#include "lib/util.hpp"
37 
38 
39 //using std::string;
40 
41 
42 namespace steam {
43 namespace engine{
44 namespace test {
45 
47  using mobject::session::PEffect;
48 
49 
50  namespace { // Test fixture
51 
59  : public StateProxy
60  {
61 
63 
64  };
65 
66 
67  inline PEffect
68  createTestEffectMObject()
69  {
70  UNIMPLEMENTED ("how to create a dummy Effect for tests");
71  }
72  }
73 
74 
75  /***************************************************************/
78  class NodeBasic_test : public Test
79  {
80  virtual void run(Arg)
81  {
82  UNIMPLEMENTED ("build a simple render node and then activate it");
83 
84  AllocationCluster alloc;
85  NodeFactory nodeFab(alloc);
86 
87  ProcNode * testSource;
88 
89 
90  WiringSituation setup(testSource);
91 
92  PEffect pEffect = createTestEffectMObject();
93  ProcNode* pNode = nodeFab (pEffect, setup);
94  CHECK (pNode);
95 
96  TestContext simulatedInvocation;
97  BuffHandle result = pNode->pull(simulatedInvocation, 0);
98 
99  CHECK (result);
100  // CHECK we got calculated data in the result buffer
101  }
102  };
103 
104 
106  LAUNCHER (NodeBasic_test, "unit node");
107 
108 
109 
110 }}} // namespace steam::engine::test
Definition: run.hpp:49
Memory management for the low-level model (render nodes network).
Steam-Layer implementation namespace root.
Create processing nodes based on given objects of the high-level model.
Definition: nodefactory.hpp:71
Mechanism to wire ProcNode instances for a render network.
Simple test class runner.
A factory to build processing nodes.
A pile of objects sharing common allocation and lifecycle.
Handle for a buffer for processing data, abstracting away the actual implementation.
Definition: buffhandle.hpp:115
Key abstraction of the Render Engine: A Data processing Node.
Definition: procnode.hpp:135
auto setup(FUN &&workFun)
Helper: setup a Worker-Pool configuration for the test.
Representation of the Media type of a data channel used within the engine.
BuffHandle pull(State &currentProcess, uint requestedOutputNr=0) const
Engine Core operation: render and pull output from this node.
Definition: procnode.hpp:171
Access point to the state of a frame rendering evaluation.
Finding out about a concrete way of wiring up a ProcNode about to be built.