]> git.ipfire.org Git - thirdparty/squid.git/blame - src/tests/testEventLoop.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / tests / testEventLoop.h
CommitLineData
4e0938ef 1/*
ef57eb7b 2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
4e0938ef
AJ
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
a553a5a3 8
9#ifndef SQUID_SRC_TEST_EVENTLOOP_H
10#define SQUID_SRC_TEST_EVENTLOOP_H
11
12#include <cppunit/extensions/HelperMacros.h>
13
14/*
15 * test the EventLoop implementation
16 */
17
18class testEventLoop : public CPPUNIT_NS::TestFixture
19{
20 CPPUNIT_TEST_SUITE( testEventLoop );
21 CPPUNIT_TEST( testCreate );
cb9b9424 22
23#if POLISHED_MAIN_LOOP
a553a5a3 24 CPPUNIT_TEST( testRunOnce );
25 CPPUNIT_TEST( testRegisterDispatcher );
8ff3fa2e 26 CPPUNIT_TEST( testRegisterEngine );
27 CPPUNIT_TEST( testEngineTimeout );
cb9b9424 28 CPPUNIT_TEST( testStopOnIdle );
29#endif
30
8ff3fa2e 31 CPPUNIT_TEST( testSetTimeService );
bef81ea5 32 CPPUNIT_TEST( testSetPrimaryEngine );
a553a5a3 33 CPPUNIT_TEST_SUITE_END();
34
35public:
16555581 36 void setUp();
a553a5a3 37
38protected:
39 void testCreate();
cb9b9424 40
41#if POLISHED_MAIN_LOOP
8ff3fa2e 42 void testEngineTimeout();
a553a5a3 43 void testRunOnce();
44 void testRegisterDispatcher();
8ff3fa2e 45 void testRegisterEngine();
cb9b9424 46 void testStopOnIdle();
47#endif
48
8ff3fa2e 49 void testSetTimeService();
bef81ea5 50 void testSetPrimaryEngine();
8ff3fa2e 51 /* TODO:
52 * test that engine which errors a couple of times, then returns 0, then
53 * errors 10 times in a row triggers a fail on the 10th time around
54 */
a553a5a3 55};
56
57#endif
58