diff --git a/tests/core/steam/engine/node-devel-test.cpp b/tests/core/steam/engine/node-devel-test.cpp index f52b9d64e..b234dbd1d 100644 --- a/tests/core/steam/engine/node-devel-test.cpp +++ b/tests/core/steam/engine/node-devel-test.cpp @@ -83,6 +83,8 @@ namespace test { processing_combineFrames(); testRand_simpleUsage(); + testRand_buildFilterNode(); + testRand_buildMixNode(); } @@ -302,6 +304,7 @@ namespace test { CHECK ( buff->isPristine()); CHECK (*buff == TestFrame(frameNr,flavour)); + // Build a node using this processing-functor... ProcNode node{prepareNode(spec.nodeID()) .preparePort() .invoke(spec.procID(), procFun) @@ -309,7 +312,9 @@ namespace test { .completePort() .build()}; - CHECK (watch(node).getPortSpec(0) == "Test:generate(TestFrame)"_expect); + CHECK (watch(node).isSrc()); + CHECK (watch(node).getNodeSpec() == "Test:generate-◎"_expect); + CHECK (watch(node).getPortSpec(0) == "generate(TestFrame)"_expect); BufferProvider& provider = DiagnosticBufferProvider::build(); BuffHandle buffHandle = provider.lockBuffer (provider.getDescriptorFor(sizeof(TestFrame))); @@ -327,6 +332,34 @@ namespace test { CHECK (result == *buff); buffHandle.release(); } + + + /** @test use the »TestRand«-framework to setup a filter node + * + */ + void + testRand_buildFilterNode() + { + auto spec = testRand().setupManipulator(); + CHECK (spec.PROTO == "manipulate-TestFrame"_expect); + + // generate a binding as processing-functor + auto procFun = spec.makeFun(); + using Sig = lib::meta::_Fun::Sig; + CHECK (showType() == "void (ulong, engine::test::TestFrame const*, engine::test::TestFrame*)"_expect); + + // Results can be verified by ont::manipulateFrame() — see above + } + + + /** @test use the »TestRand«-framework to setup a two-chain mixer node + * + */ + void + testRand_buildMixNode() + { + UNIMPLEMENTED ("Mixer Node"); + } }; diff --git a/tests/core/steam/engine/test-rand-ontology.hpp b/tests/core/steam/engine/test-rand-ontology.hpp index 5a9df7814..d248ce060 100644 --- a/tests/core/steam/engine/test-rand-ontology.hpp +++ b/tests/core/steam/engine/test-rand-ontology.hpp @@ -123,6 +123,7 @@ namespace test { TestRandOntology() = default; auto setupGenerator(); + auto setupManipulator(); private: }; @@ -170,9 +171,9 @@ namespace test { /** extended config for Generator operations */ struct ConfGen { - using Param = tuple; + using Param = tuple; - ont::Flavr fOff = 0; + Flavr fOff = 0; string streamType; ConfGen(Spec const& spec) @@ -198,6 +199,36 @@ namespace test { % streamType; } }; + + /** extended config for Manipulator/Filter operations */ + struct ConfMan + { + + Param filter = 0; + string streamType; + + ConfMan(Spec const& spec) + : streamType{spec.BASE_TYPE} + { } + + auto + binding() + { + return [offset = filter] + (Param par, TestFrame const* in, TestFrame* out) + { + manipulateFrame (out, in, par); + }; + } + + string + procSpec() + { + return _Fmt{"%s(%s)"} + % (filter? util::showHash(filter):"") + % streamType; + } + }; }//(End)namespace ont @@ -212,6 +243,18 @@ namespace test { return builder; } + + /** + * Initiate configuration of a generator-node to produce TestFrame(s) + */ + inline auto + TestRandOntology::setupManipulator() + { + Spec spec{"manipulate", ont::TYPE_TESTFRAME}; + Builder builder{spec}; + return builder; + } + /** Singleton accessor */ extern lib::Depend testRand; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 1ff5cd15a..0924f8fb5 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -92241,12 +92241,23 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + + @@ -97382,7 +97393,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -102362,7 +102373,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + @@ -102371,8 +102382,8 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension)

- - + + @@ -102384,7 +102395,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + @@ -102408,11 +102419,15 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) + + +
- + + - + @@ -102423,6 +102438,10 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) + + + +
@@ -102485,8 +102504,8 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - - + + @@ -103078,8 +103097,8 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - - + + @@ -103168,7 +103187,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + @@ -103182,9 +103201,18 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + + + + + + + + + + @@ -103225,13 +103253,19 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) + + + + + + - - + + @@ -103285,9 +103319,9 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + - + @@ -103316,13 +103350,14 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + - - - + + + - + + @@ -103366,7 +103401,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + @@ -103413,7 +103448,14 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + + + + + + + + @@ -103457,8 +103499,8 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + @@ -104021,11 +104063,11 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + - - + + @@ -104055,7 +104097,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + @@ -104068,8 +104110,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) ich wollte einen schnellen Test coden und hab daher immer wieder den gleichen Output-Buffer reingegeben; das ist so nicht erlaubt, denn der erste Aufruf hat diesen in den EMITTED-State gebracht.

- -
+
@@ -104078,7 +104119,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - +
@@ -104105,7 +104146,8 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + + @@ -104143,7 +104185,8 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + + @@ -104181,8 +104224,9 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + + @@ -104268,8 +104312,8 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - - + + @@ -104284,11 +104328,11 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + - - - + + + @@ -104965,16 +105009,33 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - - + + - + + + + + + + + + + + + + + + + + + @@ -105083,6 +105144,18 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) + + + + + + + + + + + + @@ -107054,9 +107127,8 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + - @@ -107407,8 +107479,8 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + @@ -107431,17 +107503,22 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) - + - + - + + + + + +