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