25 #ifndef WFLAGFORWARDER_TEST_H
26 #define WFLAGFORWARDER_TEST_H
30 #include <cxxtest/TestSuite.h>
32 #include "../WConditionOneShot.h"
34 #include "../WFlagForwarder.h"
58 TS_ASSERT( flagSource->get() == 5 );
59 TS_ASSERT( flagTarget1->get() == 5 );
60 TS_ASSERT( flagTarget2->get() == 5 );
63 flagSource->set( 50 );
66 TS_ASSERT( flagSource->get() == 50 );
67 TS_ASSERT( flagTarget1->get() == 50 );
68 TS_ASSERT( flagTarget2->get() == 50 );
71 flagTarget2->set( 100 );
72 TS_ASSERT( flagSource->get() == 50 );
73 TS_ASSERT( flagTarget1->get() == 50 );
74 TS_ASSERT( flagTarget2->get() == 100 );
Implements a WCondition, but can be fired only ONCE.
void testPropagation(void)
Add some flags and test whether the value gets propagated properly.
This class helps especially container module programmers to easily synchronize the value of one flag ...
void forward(std::shared_ptr< WFlag< T > > to)
Forward the source property to the specified one.
Class to have a simple notification/condition system for simple flags.