25 #ifndef WPROGRESSCOMBINER_TEST_H
26 #define WPROGRESSCOMBINER_TEST_H
30 #include <boost/shared_ptr.hpp>
32 #include <cxxtest/TestSuite.h>
34 #include "../WProgress.h"
35 #include "../WProgressCombiner.h"
60 TS_ASSERT_THROWS_NOTHING( p.
update() );
65 TS_ASSERT_THROWS_NOTHING( p.
update() );
77 boost::shared_ptr< WProgress> p1(
new WProgress(
"TestP1", 11 ) );
78 boost::shared_ptr< WProgress> p2(
new WProgress(
"TestP2", 11 ) );
79 boost::shared_ptr< WProgress> p3(
new WProgress(
"TestP3" ) );
90 TS_ASSERT( p1->getProgress() == 50.0 );
102 TS_ASSERT( !p3->isDetermined() );
125 #endif // WPROGRESSCOMBINER_TEST_H
virtual float getProgress()
Returns the overall progress of this progress instance, including the child progress'.
Class managing progress inside of modules.
virtual void addSubProgress(boost::shared_ptr< WProgress > progress)
Adds a new progress to this combiner.
Base class for all kinds of progress combinations.
std::set< boost::shared_ptr< WProgress > > m_children
Set of all child progress.
virtual void finish()
Stops the progress.
virtual bool isDetermined()
Returns true whenever the progress has a known end.
void testWithChilds()
Test the combiner when some childs got added to it.
virtual bool isPending()
Returns true when the operation is pending.
void testInstantiation()
Test whether WProgress is instantiatable.
void testInternalStateIgnoresIncrementAndFinish()
Test whether the combiner ignores manual increments.
virtual void update()
Function updating the internal state.
Class testing the functionality of progress combiners.