Skip to content

Commit 595c29e

Browse files
author
Lucas Nelaupe
authored
Generate Tests (#357)
1 parent 95ec3f0 commit 595c29e

File tree

2 files changed

+235
-0
lines changed

2 files changed

+235
-0
lines changed

Tests/LinuxMain.swift

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import XCTest
2+
3+
import SwiftQueueTests
4+
5+
var tests = [XCTestCaseEntry]()
6+
tests += SwiftQueueTests.__allTests()
7+
8+
XCTMain(tests)
+227
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
#if !canImport(ObjectiveC)
2+
import XCTest
3+
4+
extension BasicConstraintTest {
5+
// DO NOT MODIFY: This is autogenerated, use:
6+
// `swift test --generate-linuxmain`
7+
// to regenerate.
8+
static let __allTests__BasicConstraintTest = [
9+
("testContraintThrowExceptionShouldCancelOperation", testContraintThrowExceptionShouldCancelOperation),
10+
("testJobShouldBeCancelIfThrowExceptionInConstraintOnWillRun", testJobShouldBeCancelIfThrowExceptionInConstraintOnWillRun),
11+
("testOperationRunWhenConstraintTrigger", testOperationRunWhenConstraintTrigger),
12+
]
13+
}
14+
15+
extension ConstraintTestCharging {
16+
// DO NOT MODIFY: This is autogenerated, use:
17+
// `swift test --generate-linuxmain`
18+
// to regenerate.
19+
static let __allTests__ConstraintTestCharging = [
20+
("testChargingConstraintShouldRunNow", testChargingConstraintShouldRunNow),
21+
]
22+
}
23+
24+
extension ConstraintTestDeadline {
25+
// DO NOT MODIFY: This is autogenerated, use:
26+
// `swift test --generate-linuxmain`
27+
// to regenerate.
28+
static let __allTests__ConstraintTestDeadline = [
29+
("testDeadlineAfterSchedule", testDeadlineAfterSchedule),
30+
("testDeadlineWhenDeserialize", testDeadlineWhenDeserialize),
31+
("testDeadlineWhenRun", testDeadlineWhenRun),
32+
("testDeadlineWhenSchedule", testDeadlineWhenSchedule),
33+
]
34+
}
35+
36+
extension ConstraintTestDelay {
37+
// DO NOT MODIFY: This is autogenerated, use:
38+
// `swift test --generate-linuxmain`
39+
// to regenerate.
40+
static let __allTests__ConstraintTestDelay = [
41+
("testDelay", testDelay),
42+
]
43+
}
44+
45+
extension ConstraintTestNetwork {
46+
// DO NOT MODIFY: This is autogenerated, use:
47+
// `swift test --generate-linuxmain`
48+
// to regenerate.
49+
static let __allTests__ConstraintTestNetwork = [
50+
("testNetworkConstraint", testNetworkConstraint),
51+
("testNetworkConstraintWifi", testNetworkConstraintWifi),
52+
]
53+
}
54+
55+
extension ConstraintTestRepeat {
56+
// DO NOT MODIFY: This is autogenerated, use:
57+
// `swift test --generate-linuxmain`
58+
// to regenerate.
59+
static let __allTests__ConstraintTestRepeat = [
60+
("testPeriodicJob", testPeriodicJob),
61+
("testPeriodicJobUnlimited", testPeriodicJobUnlimited),
62+
("testRepeatableJobWithDelay", testRepeatableJobWithDelay),
63+
("testRepeatSerialisation", testRepeatSerialisation),
64+
]
65+
}
66+
67+
extension ConstraintTestRetry {
68+
// DO NOT MODIFY: This is autogenerated, use:
69+
// `swift test --generate-linuxmain`
70+
// to regenerate.
71+
static let __allTests__ConstraintTestRetry = [
72+
("testRepeatableJobWithExponentialBackoffRetry", testRepeatableJobWithExponentialBackoffRetry),
73+
("testRetryFailJobWithCancelConstraint", testRetryFailJobWithCancelConstraint),
74+
("testRetryFailJobWithExponentialConstraint", testRetryFailJobWithExponentialConstraint),
75+
("testRetryFailJobWithExponentialMaxDelayConstraint", testRetryFailJobWithExponentialMaxDelayConstraint),
76+
("testRetryFailJobWithRetryConstraint", testRetryFailJobWithRetryConstraint),
77+
("testRetryFailJobWithRetryDelayConstraint", testRetryFailJobWithRetryDelayConstraint),
78+
("testRetryUnlimitedShouldRetryManyTimes", testRetryUnlimitedShouldRetryManyTimes),
79+
]
80+
}
81+
82+
extension ConstraintTestTag {
83+
// DO NOT MODIFY: This is autogenerated, use:
84+
// `swift test --generate-linuxmain`
85+
// to regenerate.
86+
static let __allTests__ConstraintTestTag = [
87+
("testCancelRunningOperationByTag", testCancelRunningOperationByTag),
88+
]
89+
}
90+
91+
extension ConstraintTestTimeout {
92+
// DO NOT MODIFY: This is autogenerated, use:
93+
// `swift test --generate-linuxmain`
94+
// to regenerate.
95+
static let __allTests__ConstraintTestTimeout = [
96+
("testRunTimeoutConstraint", testRunTimeoutConstraint),
97+
]
98+
}
99+
100+
extension ConstraintTestUniqueUUID {
101+
// DO NOT MODIFY: This is autogenerated, use:
102+
// `swift test --generate-linuxmain`
103+
// to regenerate.
104+
static let __allTests__ConstraintTestUniqueUUID = [
105+
("testUniqueIdConstraintShouldCancelTheFirst", testUniqueIdConstraintShouldCancelTheFirst),
106+
("testUniqueIdConstraintShouldCancelTheSecond", testUniqueIdConstraintShouldCancelTheSecond),
107+
]
108+
}
109+
110+
extension CustomConstraintTest {
111+
// DO NOT MODIFY: This is autogenerated, use:
112+
// `swift test --generate-linuxmain`
113+
// to regenerate.
114+
static let __allTests__CustomConstraintTest = [
115+
("testCustomConstraint", testCustomConstraint),
116+
]
117+
}
118+
119+
extension LoggerTests {
120+
// DO NOT MODIFY: This is autogenerated, use:
121+
// `swift test --generate-linuxmain`
122+
// to regenerate.
123+
static let __allTests__LoggerTests = [
124+
("testLoggerLevel", testLoggerLevel),
125+
("testRunSuccessJobLogger", testRunSuccessJobLogger),
126+
]
127+
}
128+
129+
extension PersisterTests {
130+
// DO NOT MODIFY: This is autogenerated, use:
131+
// `swift test --generate-linuxmain`
132+
// to regenerate.
133+
static let __allTests__PersisterTests = [
134+
("testCancelAllShouldRemoveFromPersister", testCancelAllShouldRemoveFromPersister),
135+
("testCancelWithTagShouldRemoveFromPersister", testCancelWithTagShouldRemoveFromPersister),
136+
("testCompleteFailTaskRemoveFromSerializer", testCompleteFailTaskRemoveFromSerializer),
137+
("testCompleteJobRemoveFromSerializer", testCompleteJobRemoveFromSerializer),
138+
("testCustomSerializer", testCustomSerializer),
139+
("testLoadSerializedSortedJobShouldRunSuccess", testLoadSerializedSortedJobShouldRunSuccess),
140+
("testNonPersistedJobShouldNotBePersisted", testNonPersistedJobShouldNotBePersisted),
141+
("testRemoveAllJob", testRemoveAllJob),
142+
]
143+
}
144+
145+
extension SqOperationTest {
146+
// DO NOT MODIFY: This is autogenerated, use:
147+
// `swift test --generate-linuxmain`
148+
// to regenerate.
149+
static let __allTests__SqOperationTest = [
150+
("testQualityOfService", testQualityOfService),
151+
("testQueuePriority", testQueuePriority),
152+
]
153+
}
154+
155+
extension StartStopTests {
156+
// DO NOT MODIFY: This is autogenerated, use:
157+
// `swift test --generate-linuxmain`
158+
// to regenerate.
159+
static let __allTests__StartStopTests = [
160+
("testSchedulePeriodicJobThenStart", testSchedulePeriodicJobThenStart),
161+
("testScheduleWhenQueueStop", testScheduleWhenQueueStop),
162+
]
163+
}
164+
165+
extension SwiftQueueBuilderTests {
166+
// DO NOT MODIFY: This is autogenerated, use:
167+
// `swift test --generate-linuxmain`
168+
// to regenerate.
169+
static let __allTests__SwiftQueueBuilderTests = [
170+
("testBuilderAddTag", testBuilderAddTag),
171+
("testBuilderDeadlineCodable", testBuilderDeadlineCodable),
172+
("testBuilderDelay", testBuilderDelay),
173+
("testBuilderGroup", testBuilderGroup),
174+
("testBuilderInternetCellular", testBuilderInternetCellular),
175+
("testBuilderInternetWifi", testBuilderInternetWifi),
176+
("testBuilderJobType", testBuilderJobType),
177+
("testBuilderPeriodicUnlimited", testBuilderPeriodicUnlimited),
178+
("testBuilderRequireCharging", testBuilderRequireCharging),
179+
("testBuilderRetryLimited", testBuilderRetryLimited),
180+
("testBuilderRetryUnlimited", testBuilderRetryUnlimited),
181+
("testBuilderSingleInstance", testBuilderSingleInstance),
182+
("testBuilderSingleInstanceOverride", testBuilderSingleInstanceOverride),
183+
("testBuilderWithFreeArgs", testBuilderWithFreeArgs),
184+
("testCopyBuilder", testCopyBuilder),
185+
]
186+
}
187+
188+
extension SwiftQueueManagerTests {
189+
// DO NOT MODIFY: This is autogenerated, use:
190+
// `swift test --generate-linuxmain`
191+
// to regenerate.
192+
static let __allTests__SwiftQueueManagerTests = [
193+
("testAddOperationNotJobTask", testAddOperationNotJobTask),
194+
("testCancelAll", testCancelAll),
195+
("testCancelRunningOperation", testCancelRunningOperation),
196+
("testCancelWithTag", testCancelWithTag),
197+
("testCancelWithUUID", testCancelWithUUID),
198+
("testGetAll", testGetAll),
199+
("testGetOperation", testGetOperation),
200+
("testJobListener", testJobListener),
201+
("testLimitEquatable", testLimitEquatable),
202+
("testRunSuccessJob", testRunSuccessJob),
203+
]
204+
}
205+
206+
public func __allTests() -> [XCTestCaseEntry] {
207+
return [
208+
testCase(BasicConstraintTest.__allTests__BasicConstraintTest),
209+
testCase(ConstraintTestCharging.__allTests__ConstraintTestCharging),
210+
testCase(ConstraintTestDeadline.__allTests__ConstraintTestDeadline),
211+
testCase(ConstraintTestDelay.__allTests__ConstraintTestDelay),
212+
testCase(ConstraintTestNetwork.__allTests__ConstraintTestNetwork),
213+
testCase(ConstraintTestRepeat.__allTests__ConstraintTestRepeat),
214+
testCase(ConstraintTestRetry.__allTests__ConstraintTestRetry),
215+
testCase(ConstraintTestTag.__allTests__ConstraintTestTag),
216+
testCase(ConstraintTestTimeout.__allTests__ConstraintTestTimeout),
217+
testCase(ConstraintTestUniqueUUID.__allTests__ConstraintTestUniqueUUID),
218+
testCase(CustomConstraintTest.__allTests__CustomConstraintTest),
219+
testCase(LoggerTests.__allTests__LoggerTests),
220+
testCase(PersisterTests.__allTests__PersisterTests),
221+
testCase(SqOperationTest.__allTests__SqOperationTest),
222+
testCase(StartStopTests.__allTests__StartStopTests),
223+
testCase(SwiftQueueBuilderTests.__allTests__SwiftQueueBuilderTests),
224+
testCase(SwiftQueueManagerTests.__allTests__SwiftQueueManagerTests),
225+
]
226+
}
227+
#endif

0 commit comments

Comments
 (0)