LeechCraft 0.6.70-19214-g121e5318a7
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
corotasktest.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <QObject>
12
13namespace LC::Util
14{
15 class CoroTaskTest : public QObject
16 {
17 Q_OBJECT
18 public:
19 enum class Event
20 {
21 Parent,
22 Child,
23 FastChild,
24 SlowChild,
25 };
26 Q_ENUM (Event)
27 private slots:
28 void testReturn ();
29 void testMoveOnlyReturn ();
30 void testWait ();
31 void testTaskDestr ();
32
33 void testNetworkReplyGoodNoWait ();
34 void testNetworkReplyGoodWait ();
35 void testNetworkReplyBadNoWait ();
36 void testNetworkReplyBadWait ();
37
38 void testFutureAwaiter ();
39
40 void testWaitMany ();
41 void testWaitManyTuple ();
42 void testWaitManyInvoking ();
43 void testNCopies ();
44 void testNCopiesVoid ();
45 void testNCopiesZero ();
46 void testWaitManyJoinsAfterFailure ();
47 void testWaitManyVoidJoinsAfterFailure ();
48 void testWaitManyFirstFailureInOrderWins ();
49 void testWaitManyInvokingFactoryThrows ();
50 void testNCopiesFactoryThrows ();
51 void testWaitManyContextDeathSilenced ();
52 void testSharedTaskManyAwaiters ();
53 void testSharedTaskAwaiterRemovedOnOuterDestruction ();
54 void testSharedTaskExceptionManyAwaiters ();
55 void testSharedTaskLastCopyDestroyedByAwaiter ();
56 void testSharedTaskNonTriviallyMovableReturn ();
57
58 void testSharedContextTaskManyAwaitersContextAlive ();
59 void testSharedContextTaskContextDeadFansOutToAll ();
60 void testSharedContextTaskBodyExceptionFansOut ();
61 void testSharedContextTaskContextDeadDoesntWaitLong ();
62 void testSharedContextTaskMixedAwaitersOwnContextDies ();
63
64 void testEither ();
65 void testEitherIgnoreLeft ();
66
67 void testThrottleSameCoro ();
68 void testThrottleSameCoroSlow ();
69 void testThrottleSameCoroVerySlow ();
70 void testThrottleManyCoros ();
71
72 void testContextDestrBeforeFinish ();
73 void testContextDestrAfterFinish ();
74 void testContextDestrAwaitedSubtask ();
75 void testContextDestrDoesntWaitTimer ();
76 void testContextDestrDoesntWaitNetwork ();
77 void testContextDestrDoesntWaitProcess ();
78 void testContextDestrDoesntWaitFuture ();
79 void testContextDestrDoesntWaitPlainTask ();
80 void testContextDestrParentOutlivesChild ();
81 void testContextDestrDoesntResumeFinishedSibling ();
82 void testContextDestrSwallowedDoesntTouchNextAwaitable ();
83 void testContextDestrFromRunningCoroAborts_data ();
84 void testContextDestrFromRunningCoroAborts ();
85 void testContextOfIsPerObject ();
86 void testContextOfDiesWithObject ();
87 void testContextOfRejectsForeignThread ();
88
89 void testProcessOutcomeExited ();
90 void testProcessOutcomeFailedToStart ();
91#ifdef Q_OS_UNIX
92 void testProcessOutcomeCrashed ();
93#endif
94
95#ifdef QT_DBUS_LIB
96 void testDBus ();
97#endif
98
99 void cleanupTestCase ();
100 };
101}