test/src/SuiteMaker.cc
author Krista 'DarthMama' Bennett <krista@pep.foundation>
Thu, 16 May 2019 18:02:11 +0200
branchENGINE-553
changeset 3716 55f1a6d89704
parent 3708 42c376229484
child 3731 ecd9059f224d
permissions -rw-r--r--
Suitemaker updated
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@2634
    13
krista@2645
    14
// Begin where we generate stuff
krista@3676
    15
#include "URIAddressTests.h"
vb@3540
    16
#include "MimeTests.h"
vb@3540
    17
#include "OwnIdentitiesRetrieveTests.h"
vb@3540
    18
#include "ExpiredSubkeyTests.h"
krista@3683
    19
#include "VerifyTests.h"
vb@3540
    20
#include "UserIdCollisionTests.h"
vb@3540
    21
#include "Engine463Tests.h"
vb@3540
    22
#include "BloblistTests.h"
vb@3540
    23
#include "NewUpdateIdAndMyselfTests.h"
vb@3540
    24
#include "NoOwnIdentWritesOnDecryptTests.h"
krista@3716
    25
#include "LiteralFilenameTests.h"
vb@3540
    26
#include "I18nTests.h"
vb@3540
    27
#include "IdentityListTests.h"
vb@3540
    28
#include "PgpBinaryTests.h"
vb@3540
    29
#include "SubkeyRatingEvalTests.h"
vb@3540
    30
#include "MessageNullFromTests.h"
krista@3596
    31
#include "ExportKeyTests.h"
vb@3540
    32
#include "LeastCommonDenomColorTests.h"
vb@3540
    33
#include "StringlistTests.h"
vb@3540
    34
#include "PgpListKeysTests.h"
vb@3540
    35
#include "MessageApiTests.h"
vb@3540
    36
#include "EncryptMissingPrivateKeyTests.h"
vb@3540
    37
#include "CaseAndDotAddressTests.h"
vb@3540
    38
#include "UserIDAliasTests.h"
vb@3655
    39
#include "KeyringImportTests.h"
krista@3538
    40
#include "EnterLeaveDeviceGroupTests.h"
vb@3540
    41
#include "SignOnlyTests.h"
vb@3540
    42
#include "BCCTests.h"
vb@3540
    43
#include "Engine358Tests.h"
vb@3540
    44
#include "BlacklistAcceptNewKeyTests.h"
vb@3540
    45
#include "DecryptAttachPrivateKeyUntrustedTests.h"
krista@3538
    46
#include "BlacklistTests.h"
vb@3540
    47
#include "RevokeRegenAttachTests.h"
vb@3540
    48
#include "PepSubjectReceivedTests.h"
vb@3540
    49
#include "SequenceTests.h"
vb@3540
    50
#include "HeaderKeyImportTests.h"
vb@3540
    51
#include "EncryptAttachPrivateKeyTests.h"
vb@3540
    52
#include "ExternalRevokeTests.h"
vb@3655
    53
#include "LookupTests.h"
vb@3540
    54
#include "KeyeditTests.h"
vb@3540
    55
#include "LeastColorGroupTests.h"
krista@3538
    56
#include "DecryptAttachPrivateKeyTrustedTests.h"
krista@3217
    57
#include "CheckRenewedExpiredKeyTrustStatusTests.h"
krista@3217
    58
#include "TrustwordsTests.h"
vb@3540
    59
#include "SimpleBodyNotAltTests.h"
vb@3540
    60
#include "ReencryptPlusExtraKeysTests.h"
vb@3540
    61
#include "MapAsn1Tests.h"
krista@3538
    62
#include "DecorateTests.h"
vb@3540
    63
#include "MessageTwoPointOhTests.h"
vb@3540
    64
#include "CrashdumpTests.h"
vb@3540
    65
#include "StringpairListTests.h"
vb@3540
    66
#include "EncryptForIdentityTests.h"
vb@3540
    67
#include "KeyResetMessageTests.h"
krista@3570
    68
#include "DeleteKeyTests.h"
vb@3540
    69
#include "KeyAttachmentTests.h"
krista@3583
    70
#include "OwnKeysRetrieveTests.h"
vb@3540
    71
#include "TrustManipulationTests.h"
vb@3540
    72
#include "SyncTests.h"
krista@3708
    73
#include "SenderFPRTests.h"
krista@3660
    74
#include "RevocationTests.h"
krista@3538
    75
#include "AppleMailTests.h"
krista@2642
    76
krista@2634
    77
krista@2644
    78
const char* SuiteMaker::all_suites[] = {
krista@3676
    79
    "URIAddressTests",
vb@3540
    80
    "MimeTests",
vb@3540
    81
    "OwnIdentitiesRetrieveTests",
vb@3540
    82
    "ExpiredSubkeyTests",
krista@3683
    83
    "VerifyTests",
vb@3540
    84
    "UserIdCollisionTests",
vb@3540
    85
    "Engine463Tests",
vb@3540
    86
    "BloblistTests",
vb@3540
    87
    "NewUpdateIdAndMyselfTests",
vb@3540
    88
    "NoOwnIdentWritesOnDecryptTests",
krista@3716
    89
    "LiteralFilenameTests",
vb@3540
    90
    "I18nTests",
vb@3540
    91
    "IdentityListTests",
vb@3540
    92
    "PgpBinaryTests",
vb@3540
    93
    "SubkeyRatingEvalTests",
vb@3540
    94
    "MessageNullFromTests",
krista@3596
    95
    "ExportKeyTests",
vb@3540
    96
    "LeastCommonDenomColorTests",
vb@3540
    97
    "StringlistTests",
vb@3540
    98
    "PgpListKeysTests",
vb@3540
    99
    "MessageApiTests",
vb@3540
   100
    "EncryptMissingPrivateKeyTests",
vb@3540
   101
    "CaseAndDotAddressTests",
vb@3540
   102
    "UserIDAliasTests",
vb@3655
   103
    "KeyringImportTests",
krista@3538
   104
    "EnterLeaveDeviceGroupTests",
vb@3540
   105
    "SignOnlyTests",
vb@3540
   106
    "BCCTests",
vb@3540
   107
    "Engine358Tests",
vb@3540
   108
    "BlacklistAcceptNewKeyTests",
vb@3540
   109
    "DecryptAttachPrivateKeyUntrustedTests",
krista@3538
   110
    "BlacklistTests",
vb@3540
   111
    "RevokeRegenAttachTests",
vb@3540
   112
    "PepSubjectReceivedTests",
vb@3540
   113
    "SequenceTests",
vb@3540
   114
    "HeaderKeyImportTests",
vb@3540
   115
    "EncryptAttachPrivateKeyTests",
vb@3540
   116
    "ExternalRevokeTests",
vb@3655
   117
    "LookupTests",
vb@3540
   118
    "KeyeditTests",
vb@3540
   119
    "LeastColorGroupTests",
krista@3538
   120
    "DecryptAttachPrivateKeyTrustedTests",
krista@3217
   121
    "CheckRenewedExpiredKeyTrustStatusTests",
krista@3217
   122
    "TrustwordsTests",
vb@3540
   123
    "SimpleBodyNotAltTests",
vb@3540
   124
    "ReencryptPlusExtraKeysTests",
vb@3540
   125
    "MapAsn1Tests",
krista@3538
   126
    "DecorateTests",
vb@3540
   127
    "MessageTwoPointOhTests",
vb@3540
   128
    "CrashdumpTests",
vb@3540
   129
    "StringpairListTests",
vb@3540
   130
    "EncryptForIdentityTests",
vb@3540
   131
    "KeyResetMessageTests",
krista@3570
   132
    "DeleteKeyTests",
vb@3540
   133
    "KeyAttachmentTests",
krista@3583
   134
    "OwnKeysRetrieveTests",
vb@3540
   135
    "TrustManipulationTests",
vb@3540
   136
    "SyncTests",
krista@3708
   137
    "SenderFPRTests",
krista@3660
   138
    "RevocationTests",
krista@3538
   139
    "AppleMailTests",
krista@2642
   140
};
krista@2642
   141
krista@2644
   142
// This file is generated, so magic constants are ok.
krista@3716
   143
int SuiteMaker::num_suites = 61;
krista@2644
   144
krista@2644
   145
void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
krista@3676
   146
    if (strcmp(test_class_name, "URIAddressTests") == 0)
krista@3676
   147
        *test_suite = new URIAddressTests(test_class_name, test_home);
krista@3676
   148
    else if (strcmp(test_class_name, "MimeTests") == 0)
vb@3540
   149
        *test_suite = new MimeTests(test_class_name, test_home);
vb@3540
   150
    else if (strcmp(test_class_name, "OwnIdentitiesRetrieveTests") == 0)
vb@3540
   151
        *test_suite = new OwnIdentitiesRetrieveTests(test_class_name, test_home);
vb@3540
   152
    else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
vb@3540
   153
        *test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
krista@3683
   154
    else if (strcmp(test_class_name, "VerifyTests") == 0)
krista@3683
   155
        *test_suite = new VerifyTests(test_class_name, test_home);
vb@3540
   156
    else if (strcmp(test_class_name, "UserIdCollisionTests") == 0)
vb@3540
   157
        *test_suite = new UserIdCollisionTests(test_class_name, test_home);
vb@3540
   158
    else if (strcmp(test_class_name, "Engine463Tests") == 0)
vb@3540
   159
        *test_suite = new Engine463Tests(test_class_name, test_home);
vb@3540
   160
    else if (strcmp(test_class_name, "BloblistTests") == 0)
vb@3540
   161
        *test_suite = new BloblistTests(test_class_name, test_home);
vb@3540
   162
    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
vb@3540
   163
        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
vb@3540
   164
    else if (strcmp(test_class_name, "NoOwnIdentWritesOnDecryptTests") == 0)
vb@3540
   165
        *test_suite = new NoOwnIdentWritesOnDecryptTests(test_class_name, test_home);
krista@3716
   166
    else if (strcmp(test_class_name, "LiteralFilenameTests") == 0)
krista@3716
   167
        *test_suite = new LiteralFilenameTests(test_class_name, test_home);
vb@3540
   168
    else if (strcmp(test_class_name, "I18nTests") == 0)
vb@3540
   169
        *test_suite = new I18nTests(test_class_name, test_home);
vb@3540
   170
    else if (strcmp(test_class_name, "IdentityListTests") == 0)
vb@3540
   171
        *test_suite = new IdentityListTests(test_class_name, test_home);
vb@3540
   172
    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
vb@3540
   173
        *test_suite = new PgpBinaryTests(test_class_name, test_home);
vb@3540
   174
    else if (strcmp(test_class_name, "SubkeyRatingEvalTests") == 0)
vb@3540
   175
        *test_suite = new SubkeyRatingEvalTests(test_class_name, test_home);
vb@3540
   176
    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
vb@3540
   177
        *test_suite = new MessageNullFromTests(test_class_name, test_home);
krista@3596
   178
    else if (strcmp(test_class_name, "ExportKeyTests") == 0)
krista@3596
   179
        *test_suite = new ExportKeyTests(test_class_name, test_home);
krista@3538
   180
    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
krista@3538
   181
        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
vb@3540
   182
    else if (strcmp(test_class_name, "StringlistTests") == 0)
vb@3540
   183
        *test_suite = new StringlistTests(test_class_name, test_home);
vb@3540
   184
    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
vb@3540
   185
        *test_suite = new PgpListKeysTests(test_class_name, test_home);
vb@3540
   186
    else if (strcmp(test_class_name, "MessageApiTests") == 0)
vb@3540
   187
        *test_suite = new MessageApiTests(test_class_name, test_home);
vb@3540
   188
    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
vb@3540
   189
        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
vb@3540
   190
    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
vb@3540
   191
        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
vb@3540
   192
    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
vb@3540
   193
        *test_suite = new UserIDAliasTests(test_class_name, test_home);
vb@3655
   194
    else if (strcmp(test_class_name, "KeyringImportTests") == 0)
vb@3655
   195
        *test_suite = new KeyringImportTests(test_class_name, test_home);
vb@3540
   196
    else if (strcmp(test_class_name, "EnterLeaveDeviceGroupTests") == 0)
vb@3540
   197
        *test_suite = new EnterLeaveDeviceGroupTests(test_class_name, test_home);
vb@3540
   198
    else if (strcmp(test_class_name, "SignOnlyTests") == 0)
vb@3540
   199
        *test_suite = new SignOnlyTests(test_class_name, test_home);
vb@3540
   200
    else if (strcmp(test_class_name, "BCCTests") == 0)
vb@3540
   201
        *test_suite = new BCCTests(test_class_name, test_home);
vb@3540
   202
    else if (strcmp(test_class_name, "Engine358Tests") == 0)
vb@3540
   203
        *test_suite = new Engine358Tests(test_class_name, test_home);
vb@3540
   204
    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
vb@3540
   205
        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
vb@3540
   206
    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
vb@3540
   207
        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
krista@3538
   208
    else if (strcmp(test_class_name, "BlacklistTests") == 0)
krista@3538
   209
        *test_suite = new BlacklistTests(test_class_name, test_home);
vb@3540
   210
    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
vb@3540
   211
        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
vb@3540
   212
    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
vb@3540
   213
        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
vb@3540
   214
    else if (strcmp(test_class_name, "SequenceTests") == 0)
vb@3540
   215
        *test_suite = new SequenceTests(test_class_name, test_home);
vb@3540
   216
    else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
vb@3540
   217
        *test_suite = new HeaderKeyImportTests(test_class_name, test_home);
vb@3540
   218
    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
vb@3540
   219
        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
vb@3540
   220
    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
vb@3540
   221
        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
vb@3655
   222
    else if (strcmp(test_class_name, "LookupTests") == 0)
vb@3655
   223
        *test_suite = new LookupTests(test_class_name, test_home);
vb@3540
   224
    else if (strcmp(test_class_name, "KeyeditTests") == 0)
vb@3540
   225
        *test_suite = new KeyeditTests(test_class_name, test_home);
vb@3540
   226
    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
vb@3540
   227
        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
krista@3538
   228
    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
krista@3538
   229
        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
krista@3217
   230
    else if (strcmp(test_class_name, "CheckRenewedExpiredKeyTrustStatusTests") == 0)
krista@3217
   231
        *test_suite = new CheckRenewedExpiredKeyTrustStatusTests(test_class_name, test_home);
krista@3217
   232
    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
krista@3217
   233
        *test_suite = new TrustwordsTests(test_class_name, test_home);
vb@3540
   234
    else if (strcmp(test_class_name, "SimpleBodyNotAltTests") == 0)
vb@3540
   235
        *test_suite = new SimpleBodyNotAltTests(test_class_name, test_home);
vb@3540
   236
    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
vb@3540
   237
        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
vb@3540
   238
    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
vb@3540
   239
        *test_suite = new MapAsn1Tests(test_class_name, test_home);
krista@3538
   240
    else if (strcmp(test_class_name, "DecorateTests") == 0)
krista@3538
   241
        *test_suite = new DecorateTests(test_class_name, test_home);
vb@3540
   242
    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
vb@3540
   243
        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
vb@3540
   244
    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
vb@3540
   245
        *test_suite = new CrashdumpTests(test_class_name, test_home);
vb@3540
   246
    else if (strcmp(test_class_name, "StringpairListTests") == 0)
vb@3540
   247
        *test_suite = new StringpairListTests(test_class_name, test_home);
vb@3540
   248
    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
vb@3540
   249
        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
vb@3540
   250
    else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
vb@3540
   251
        *test_suite = new KeyResetMessageTests(test_class_name, test_home);
krista@3570
   252
    else if (strcmp(test_class_name, "DeleteKeyTests") == 0)
krista@3570
   253
        *test_suite = new DeleteKeyTests(test_class_name, test_home);
vb@3540
   254
    else if (strcmp(test_class_name, "KeyAttachmentTests") == 0)
vb@3540
   255
        *test_suite = new KeyAttachmentTests(test_class_name, test_home);
krista@3583
   256
    else if (strcmp(test_class_name, "OwnKeysRetrieveTests") == 0)
krista@3583
   257
        *test_suite = new OwnKeysRetrieveTests(test_class_name, test_home);
vb@3540
   258
    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
vb@3540
   259
        *test_suite = new TrustManipulationTests(test_class_name, test_home);
vb@3540
   260
    else if (strcmp(test_class_name, "SyncTests") == 0)
vb@3540
   261
        *test_suite = new SyncTests(test_class_name, test_home);
krista@3708
   262
    else if (strcmp(test_class_name, "SenderFPRTests") == 0)
krista@3708
   263
        *test_suite = new SenderFPRTests(test_class_name, test_home);
krista@3660
   264
    else if (strcmp(test_class_name, "RevocationTests") == 0)
krista@3660
   265
        *test_suite = new RevocationTests(test_class_name, test_home);
krista@3538
   266
    else if (strcmp(test_class_name, "AppleMailTests") == 0)
krista@3538
   267
        *test_suite = new AppleMailTests(test_class_name, test_home);
krista@2634
   268
}
krista@2644
   269
krista@2644
   270
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
   271
    for (int i = 0; i < num_to_run; i++) {
krista@2644
   272
        Test::Suite* suite = NULL;
krista@2644
   273
        SuiteMaker::suitemaker_build(test_class_names[i], test_home, &suite);
krista@2644
   274
        if (!suite)
krista@2644
   275
            throw std::runtime_error("Could not create a test suite instance."); // FIXME, better error, cleanup, obviously
krista@2644
   276
        test_suites.push_back(suite);
krista@2645
   277
    }
krista@2644
   278
}
krista@2644
   279
void SuiteMaker::suitemaker_buildall(const char* test_home, std::vector<Test::Suite*>& test_suites) {
krista@2644
   280
    SuiteMaker::suitemaker_buildlist(SuiteMaker::all_suites, SuiteMaker::num_suites, test_home, test_suites);
krista@2644
   281
}
krista@2645
   282