#include <cppunit/TestAssert.h>
#include "AsyncEngine.h"
-#include "CompletionDispatcher.h"
+#include "AsyncCallQueue.h"
#include "Mem.h"
#include "testEventLoop.h"
#include "EventLoop.h"
EventLoop();
}
+#if POLISHED_MAIN_LOOP
/*
* Running the loop once is useful for integration with other loops, such as
}
};
+#endif /* POLISHED_MAIN_LOOP */
+
class RecordingEngine : public AsyncEngine
{
}
};
+#if POLISHED_MAIN_LOOP
+
void
testEventLoop::testRunOnce()
{
CPPUNIT_ASSERT_EQUAL(false, theLoop.runOnce());
}
+#endif /* POLISHED_MAIN_LOOP */
+
/* An event loop has a time service which is like an async engine but never
* generates events and there can only be one such service.
*/
{
CPPUNIT_TEST_SUITE( testEventLoop );
CPPUNIT_TEST( testCreate );
+
+#if POLISHED_MAIN_LOOP
CPPUNIT_TEST( testRunOnce );
CPPUNIT_TEST( testRegisterDispatcher );
CPPUNIT_TEST( testRegisterEngine );
CPPUNIT_TEST( testEngineTimeout );
+ CPPUNIT_TEST( testStopOnIdle );
+#endif
+
CPPUNIT_TEST( testSetTimeService );
CPPUNIT_TEST( testSetPrimaryEngine );
- CPPUNIT_TEST( testStopOnIdle );
CPPUNIT_TEST_SUITE_END();
public:
protected:
void testCreate();
+
+#if POLISHED_MAIN_LOOP
void testEngineTimeout();
void testRunOnce();
void testRegisterDispatcher();
void testRegisterEngine();
+ void testStopOnIdle();
+#endif
+
void testSetTimeService();
void testSetPrimaryEngine();
- void testStopOnIdle();
/* TODO:
* test that engine which errors a couple of times, then returns 0, then
* errors 10 times in a row triggers a fail on the 10th time around