krista@2645
|
1 |
// This file is under GNU General Public License 3.0
|
krista@2645
|
2 |
// see LICENSE.txt
|
krista@2645
|
3 |
|
krista@2645
|
4 |
//
|
krista@2645
|
5 |
// src/SuiteMaker.cc generated by gensuitemaker.py - changes may be overwritten. You've been warned!
|
krista@2645
|
6 |
//
|
krista@2645
|
7 |
|
krista@2637
|
8 |
#include <cpptest.h>
|
krista@2634
|
9 |
#include <cpptest-suite.h>
|
krista@2644
|
10 |
#include <memory>
|
krista@2644
|
11 |
#include <vector>
|
krista@2645
|
12 |
#include "SuiteMaker.h"
|
krista@2644
|
13 |
|
krista@2645
|
14 |
// Begin where we generate stuff
|
krista@3050
|
15 |
#include "DecorateTests.h"
|
krista@3121
|
16 |
#include "UserIdCollisionTests.h"
|
krista@3050
|
17 |
#include "ReencryptPlusExtraKeysTests.h"
|
krista@3120
|
18 |
#include "BlacklistTests.h"
|
krista@3121
|
19 |
#include "AppleMailTests.h"
|
krista@3121
|
20 |
#include "MessageTwoPointOhTests.h"
|
krista@3121
|
21 |
#include "IdentityListTests.h"
|
krista@3121
|
22 |
#include "I18nTests.h"
|
krista@3121
|
23 |
#include "Engine463Tests.h"
|
krista@3121
|
24 |
#include "DecryptAttachPrivateKeyUntrustedTests.h"
|
krista@3121
|
25 |
#include "BCCTests.h"
|
krista@3121
|
26 |
#include "LeastColorGroupTests.h"
|
krista@3121
|
27 |
#include "Engine358Tests.h"
|
krista@3050
|
28 |
#include "MistrustUndoTests.h"
|
krista@3121
|
29 |
#include "BlacklistAcceptNewKeyTests.h"
|
krista@3121
|
30 |
#include "MessageApiTests.h"
|
krista@3121
|
31 |
#include "StringlistTests.h"
|
krista@3121
|
32 |
#include "HeaderKeyImportTests.h"
|
krista@3121
|
33 |
#include "StringpairListTests.h"
|
krista@3121
|
34 |
#include "TrustManipulationTests.h"
|
krista@3121
|
35 |
#include "EncryptAttachPrivateKeyTests.h"
|
krista@3121
|
36 |
#include "BloblistTests.h"
|
krista@3121
|
37 |
#include "SequenceTests.h"
|
krista@3120
|
38 |
#include "TrustwordsTests.h"
|
krista@3121
|
39 |
#include "RevokeRegenAttachTests.h"
|
krista@3121
|
40 |
#include "CheckRenewedExpiredKeyTrustStatusTests.h"
|
krista@3121
|
41 |
#include "EncryptMissingPrivateKeyTests.h"
|
krista@3121
|
42 |
#include "PepSubjectReceivedTests.h"
|
krista@3121
|
43 |
#include "KeyeditTests.h"
|
krista@3121
|
44 |
#include "MapAsn1Tests.h"
|
krista@3121
|
45 |
#include "PgpBinaryTests.h"
|
krista@3120
|
46 |
#include "DecryptAttachPrivateKeyTrustedTests.h"
|
krista@3121
|
47 |
#include "MessageNullFromTests.h"
|
krista@3121
|
48 |
#include "MimeTests.h"
|
krista@3121
|
49 |
#include "PgpListKeysTests.h"
|
krista@3121
|
50 |
#include "NewUpdateIdAndMyselfTests.h"
|
krista@3121
|
51 |
#include "EncryptForIdentityTests.h"
|
krista@3121
|
52 |
#include "CrashdumpTests.h"
|
krista@3120
|
53 |
#include "CaseAndDotAddressTests.h"
|
krista@3121
|
54 |
#include "ExpiredSubkeyTests.h"
|
krista@3121
|
55 |
#include "LeastCommonDenomColorTests.h"
|
krista@3121
|
56 |
#include "ExternalRevokeTests.h"
|
krista@3121
|
57 |
#include "UserIDAliasTests.h"
|
krista@2642
|
58 |
|
krista@2637
|
59 |
|
krista@2644
|
60 |
const char* SuiteMaker::all_suites[] = {
|
krista@3050
|
61 |
"DecorateTests",
|
krista@3121
|
62 |
"UserIdCollisionTests",
|
krista@3050
|
63 |
"ReencryptPlusExtraKeysTests",
|
krista@3120
|
64 |
"BlacklistTests",
|
krista@3121
|
65 |
"AppleMailTests",
|
krista@3121
|
66 |
"MessageTwoPointOhTests",
|
krista@3121
|
67 |
"IdentityListTests",
|
krista@3121
|
68 |
"I18nTests",
|
krista@3121
|
69 |
"Engine463Tests",
|
krista@3121
|
70 |
"DecryptAttachPrivateKeyUntrustedTests",
|
krista@3121
|
71 |
"BCCTests",
|
krista@3121
|
72 |
"LeastColorGroupTests",
|
krista@3121
|
73 |
"Engine358Tests",
|
krista@3050
|
74 |
"MistrustUndoTests",
|
krista@3121
|
75 |
"BlacklistAcceptNewKeyTests",
|
krista@3121
|
76 |
"MessageApiTests",
|
krista@3121
|
77 |
"StringlistTests",
|
krista@3121
|
78 |
"HeaderKeyImportTests",
|
krista@3121
|
79 |
"StringpairListTests",
|
krista@3121
|
80 |
"TrustManipulationTests",
|
krista@3121
|
81 |
"EncryptAttachPrivateKeyTests",
|
krista@3121
|
82 |
"BloblistTests",
|
krista@3121
|
83 |
"SequenceTests",
|
krista@3120
|
84 |
"TrustwordsTests",
|
krista@3121
|
85 |
"RevokeRegenAttachTests",
|
krista@3121
|
86 |
"CheckRenewedExpiredKeyTrustStatusTests",
|
krista@3121
|
87 |
"EncryptMissingPrivateKeyTests",
|
krista@3121
|
88 |
"PepSubjectReceivedTests",
|
krista@3121
|
89 |
"KeyeditTests",
|
krista@3121
|
90 |
"MapAsn1Tests",
|
krista@3121
|
91 |
"PgpBinaryTests",
|
krista@3120
|
92 |
"DecryptAttachPrivateKeyTrustedTests",
|
krista@3121
|
93 |
"MessageNullFromTests",
|
krista@3121
|
94 |
"MimeTests",
|
krista@3121
|
95 |
"PgpListKeysTests",
|
krista@3121
|
96 |
"NewUpdateIdAndMyselfTests",
|
krista@3121
|
97 |
"EncryptForIdentityTests",
|
krista@3121
|
98 |
"CrashdumpTests",
|
krista@3120
|
99 |
"CaseAndDotAddressTests",
|
krista@3121
|
100 |
"ExpiredSubkeyTests",
|
krista@3121
|
101 |
"LeastCommonDenomColorTests",
|
krista@3121
|
102 |
"ExternalRevokeTests",
|
krista@3121
|
103 |
"UserIDAliasTests",
|
krista@2642
|
104 |
};
|
krista@2642
|
105 |
|
krista@2644
|
106 |
// This file is generated, so magic constants are ok.
|
krista@3104
|
107 |
int SuiteMaker::num_suites = 43;
|
krista@2644
|
108 |
|
krista@2644
|
109 |
void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
|
krista@3121
|
110 |
if (strcmp(test_class_name, "DecorateTests") == 0)
|
krista@3050
|
111 |
*test_suite = new DecorateTests(test_class_name, test_home);
|
krista@3121
|
112 |
else if (strcmp(test_class_name, "UserIdCollisionTests") == 0)
|
krista@3121
|
113 |
*test_suite = new UserIdCollisionTests(test_class_name, test_home);
|
krista@3050
|
114 |
else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
|
krista@3050
|
115 |
*test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
|
krista@3121
|
116 |
else if (strcmp(test_class_name, "BlacklistTests") == 0)
|
krista@3121
|
117 |
*test_suite = new BlacklistTests(test_class_name, test_home);
|
krista@3121
|
118 |
else if (strcmp(test_class_name, "AppleMailTests") == 0)
|
krista@3121
|
119 |
*test_suite = new AppleMailTests(test_class_name, test_home);
|
krista@3050
|
120 |
else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
|
krista@3050
|
121 |
*test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
|
krista@3121
|
122 |
else if (strcmp(test_class_name, "IdentityListTests") == 0)
|
krista@3121
|
123 |
*test_suite = new IdentityListTests(test_class_name, test_home);
|
krista@3121
|
124 |
else if (strcmp(test_class_name, "I18nTests") == 0)
|
krista@3121
|
125 |
*test_suite = new I18nTests(test_class_name, test_home);
|
krista@3121
|
126 |
else if (strcmp(test_class_name, "Engine463Tests") == 0)
|
krista@3121
|
127 |
*test_suite = new Engine463Tests(test_class_name, test_home);
|
krista@3121
|
128 |
else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
|
krista@3121
|
129 |
*test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
|
krista@3121
|
130 |
else if (strcmp(test_class_name, "BCCTests") == 0)
|
krista@3121
|
131 |
*test_suite = new BCCTests(test_class_name, test_home);
|
krista@3121
|
132 |
else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
|
krista@3121
|
133 |
*test_suite = new LeastColorGroupTests(test_class_name, test_home);
|
krista@3121
|
134 |
else if (strcmp(test_class_name, "Engine358Tests") == 0)
|
krista@3121
|
135 |
*test_suite = new Engine358Tests(test_class_name, test_home);
|
krista@3050
|
136 |
else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
|
krista@3050
|
137 |
*test_suite = new MistrustUndoTests(test_class_name, test_home);
|
krista@3121
|
138 |
else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
|
krista@3121
|
139 |
*test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
|
krista@3121
|
140 |
else if (strcmp(test_class_name, "MessageApiTests") == 0)
|
krista@3121
|
141 |
*test_suite = new MessageApiTests(test_class_name, test_home);
|
krista@3121
|
142 |
else if (strcmp(test_class_name, "StringlistTests") == 0)
|
krista@3121
|
143 |
*test_suite = new StringlistTests(test_class_name, test_home);
|
krista@3121
|
144 |
else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
|
krista@3121
|
145 |
*test_suite = new HeaderKeyImportTests(test_class_name, test_home);
|
krista@3121
|
146 |
else if (strcmp(test_class_name, "StringpairListTests") == 0)
|
krista@3121
|
147 |
*test_suite = new StringpairListTests(test_class_name, test_home);
|
krista@3121
|
148 |
else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
|
krista@3121
|
149 |
*test_suite = new TrustManipulationTests(test_class_name, test_home);
|
krista@3121
|
150 |
else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
|
krista@3121
|
151 |
*test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
|
krista@3120
|
152 |
else if (strcmp(test_class_name, "BloblistTests") == 0)
|
krista@3120
|
153 |
*test_suite = new BloblistTests(test_class_name, test_home);
|
vb@3045
|
154 |
else if (strcmp(test_class_name, "SequenceTests") == 0)
|
vb@3045
|
155 |
*test_suite = new SequenceTests(test_class_name, test_home);
|
krista@3121
|
156 |
else if (strcmp(test_class_name, "TrustwordsTests") == 0)
|
krista@3121
|
157 |
*test_suite = new TrustwordsTests(test_class_name, test_home);
|
krista@3121
|
158 |
else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
|
krista@3121
|
159 |
*test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
|
krista@3121
|
160 |
else if (strcmp(test_class_name, "CheckRenewedExpiredKeyTrustStatusTests") == 0)
|
krista@3121
|
161 |
*test_suite = new CheckRenewedExpiredKeyTrustStatusTests(test_class_name, test_home);
|
krista@3121
|
162 |
else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
|
krista@3121
|
163 |
*test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
|
krista@3121
|
164 |
else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
|
krista@3121
|
165 |
*test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
|
krista@3121
|
166 |
else if (strcmp(test_class_name, "KeyeditTests") == 0)
|
krista@3121
|
167 |
*test_suite = new KeyeditTests(test_class_name, test_home);
|
krista@3121
|
168 |
else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
|
krista@3121
|
169 |
*test_suite = new MapAsn1Tests(test_class_name, test_home);
|
krista@3120
|
170 |
else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
|
krista@3120
|
171 |
*test_suite = new PgpBinaryTests(test_class_name, test_home);
|
krista@3121
|
172 |
else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
|
krista@3121
|
173 |
*test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
|
krista@3121
|
174 |
else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
|
krista@3121
|
175 |
*test_suite = new MessageNullFromTests(test_class_name, test_home);
|
krista@3121
|
176 |
else if (strcmp(test_class_name, "MimeTests") == 0)
|
krista@3121
|
177 |
*test_suite = new MimeTests(test_class_name, test_home);
|
krista@3121
|
178 |
else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
|
krista@3121
|
179 |
*test_suite = new PgpListKeysTests(test_class_name, test_home);
|
krista@3121
|
180 |
else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
|
krista@3121
|
181 |
*test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
|
krista@3121
|
182 |
else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
|
krista@3121
|
183 |
*test_suite = new EncryptForIdentityTests(test_class_name, test_home);
|
krista@3121
|
184 |
else if (strcmp(test_class_name, "CrashdumpTests") == 0)
|
krista@3121
|
185 |
*test_suite = new CrashdumpTests(test_class_name, test_home);
|
krista@3120
|
186 |
else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
|
krista@3120
|
187 |
*test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
|
krista@3121
|
188 |
else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
|
krista@3121
|
189 |
*test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
|
krista@3121
|
190 |
else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
|
krista@3121
|
191 |
*test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
|
krista@3121
|
192 |
else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
|
krista@3121
|
193 |
*test_suite = new ExternalRevokeTests(test_class_name, test_home);
|
krista@3121
|
194 |
else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
|
krista@3121
|
195 |
*test_suite = new UserIDAliasTests(test_class_name, test_home);
|
krista@2634
|
196 |
}
|
krista@2644
|
197 |
|
krista@2644
|
198 |
void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {
|
krista@2644
|
199 |
for (int i = 0; i < num_to_run; i++) {
|
krista@2644
|
200 |
Test::Suite* suite = NULL;
|
krista@2644
|
201 |
SuiteMaker::suitemaker_build(test_class_names[i], test_home, &suite);
|
krista@2644
|
202 |
if (!suite)
|
krista@2644
|
203 |
throw std::runtime_error("Could not create a test suite instance."); // FIXME, better error, cleanup, obviously
|
krista@2644
|
204 |
test_suites.push_back(suite);
|
krista@2645
|
205 |
}
|
krista@2644
|
206 |
}
|
krista@2644
|
207 |
void SuiteMaker::suitemaker_buildall(const char* test_home, std::vector<Test::Suite*>& test_suites) {
|
krista@2644
|
208 |
SuiteMaker::suitemaker_buildlist(SuiteMaker::all_suites, SuiteMaker::num_suites, test_home, test_suites);
|
krista@2644
|
209 |
}
|
krista@2645
|
210 |
|