test/src/SuiteMaker.cc
author Krista 'DarthMama' Bennett <krista@pep.foundation>
Tue, 26 Mar 2019 19:14:46 +0100
branchsync
changeset 3400 127abd38d1c2
parent 3352 9f804c455d21
child 3422 09bec729847d
permissions -rw-r--r--
Argh, cut-and-paste error broke all the things.
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@3217
    15
#include "MimeTests.h"
krista@3400
    16
#include "OwnIdentitiesRetrieveTests.h"
krista@3217
    17
#include "ExpiredSubkeyTests.h"
krista@3121
    18
#include "UserIdCollisionTests.h"
krista@3121
    19
#include "Engine463Tests.h"
krista@3121
    20
#include "BloblistTests.h"
krista@3217
    21
#include "NewUpdateIdAndMyselfTests.h"
krista@3350
    22
#include "NoOwnIdentWritesOnDecryptTests.h"
krista@3217
    23
#include "I18nTests.h"
krista@3217
    24
#include "IdentityListTests.h"
krista@3121
    25
#include "PgpBinaryTests.h"
krista@3230
    26
#include "SubkeyRatingEvalTests.h"
krista@3121
    27
#include "MessageNullFromTests.h"
krista@3217
    28
#include "LeastCommonDenomColorTests.h"
krista@3217
    29
#include "StringlistTests.h"
krista@3121
    30
#include "PgpListKeysTests.h"
krista@3217
    31
#include "MessageApiTests.h"
krista@3217
    32
#include "EncryptMissingPrivateKeyTests.h"
krista@3217
    33
#include "CaseAndDotAddressTests.h"
krista@3217
    34
#include "UserIDAliasTests.h"
krista@3244
    35
#include "SignOnlyTests.h"
krista@3217
    36
#include "BCCTests.h"
krista@3217
    37
#include "Engine358Tests.h"
krista@3217
    38
#include "BlacklistAcceptNewKeyTests.h"
krista@3217
    39
#include "DecryptAttachPrivateKeyUntrustedTests.h"
krista@3217
    40
#include "BlacklistTests.h"
krista@3217
    41
#include "RevokeRegenAttachTests.h"
krista@3217
    42
#include "PepSubjectReceivedTests.h"
krista@3217
    43
#include "SequenceTests.h"
krista@3217
    44
#include "HeaderKeyImportTests.h"
krista@3217
    45
#include "EncryptAttachPrivateKeyTests.h"
krista@3217
    46
#include "ExternalRevokeTests.h"
krista@3217
    47
#include "KeyeditTests.h"
krista@3217
    48
#include "LeastColorGroupTests.h"
krista@3217
    49
#include "DecryptAttachPrivateKeyTrustedTests.h"
krista@3217
    50
#include "CheckRenewedExpiredKeyTrustStatusTests.h"
krista@3217
    51
#include "TrustwordsTests.h"
krista@3265
    52
#include "SimpleBodyNotAltTests.h"
krista@3217
    53
#include "ReencryptPlusExtraKeysTests.h"
krista@3217
    54
#include "MapAsn1Tests.h"
krista@3217
    55
#include "DecorateTests.h"
krista@3217
    56
#include "MessageTwoPointOhTests.h"
krista@3121
    57
#include "CrashdumpTests.h"
krista@3217
    58
#include "StringpairListTests.h"
krista@3217
    59
#include "EncryptForIdentityTests.h"
krista@3244
    60
#include "KeyResetMessageTests.h"
krista@3255
    61
#include "KeyAttachmentTests.h"
krista@3217
    62
#include "TrustManipulationTests.h"
vb@3242
    63
#include "SyncTests.h"
krista@3217
    64
#include "AppleMailTests.h"
krista@2642
    65
krista@2637
    66
krista@2644
    67
const char* SuiteMaker::all_suites[] = {
krista@3217
    68
    "MimeTests",
krista@3400
    69
    "OwnIdentitiesRetrieveTests",
krista@3217
    70
    "ExpiredSubkeyTests",
krista@3121
    71
    "UserIdCollisionTests",
krista@3121
    72
    "Engine463Tests",
krista@3121
    73
    "BloblistTests",
krista@3217
    74
    "NewUpdateIdAndMyselfTests",
krista@3350
    75
    "NoOwnIdentWritesOnDecryptTests",
krista@3217
    76
    "I18nTests",
krista@3217
    77
    "IdentityListTests",
krista@3121
    78
    "PgpBinaryTests",
krista@3230
    79
    "SubkeyRatingEvalTests",
krista@3121
    80
    "MessageNullFromTests",
krista@3217
    81
    "LeastCommonDenomColorTests",
krista@3217
    82
    "StringlistTests",
krista@3121
    83
    "PgpListKeysTests",
krista@3217
    84
    "MessageApiTests",
krista@3217
    85
    "EncryptMissingPrivateKeyTests",
krista@3217
    86
    "CaseAndDotAddressTests",
krista@3217
    87
    "UserIDAliasTests",
krista@3244
    88
    "SignOnlyTests",
krista@3217
    89
    "BCCTests",
krista@3217
    90
    "Engine358Tests",
krista@3217
    91
    "BlacklistAcceptNewKeyTests",
krista@3217
    92
    "DecryptAttachPrivateKeyUntrustedTests",
krista@3217
    93
    "BlacklistTests",
krista@3217
    94
    "RevokeRegenAttachTests",
krista@3217
    95
    "PepSubjectReceivedTests",
krista@3217
    96
    "SequenceTests",
krista@3217
    97
    "HeaderKeyImportTests",
krista@3217
    98
    "EncryptAttachPrivateKeyTests",
krista@3217
    99
    "ExternalRevokeTests",
krista@3217
   100
    "KeyeditTests",
krista@3217
   101
    "LeastColorGroupTests",
krista@3217
   102
    "DecryptAttachPrivateKeyTrustedTests",
krista@3217
   103
    "CheckRenewedExpiredKeyTrustStatusTests",
krista@3217
   104
    "TrustwordsTests",
krista@3265
   105
    "SimpleBodyNotAltTests",
krista@3217
   106
    "ReencryptPlusExtraKeysTests",
krista@3217
   107
    "MapAsn1Tests",
krista@3217
   108
    "DecorateTests",
krista@3217
   109
    "MessageTwoPointOhTests",
krista@3121
   110
    "CrashdumpTests",
krista@3217
   111
    "StringpairListTests",
krista@3217
   112
    "EncryptForIdentityTests",
krista@3244
   113
    "KeyResetMessageTests",
krista@3255
   114
    "KeyAttachmentTests",
krista@3217
   115
    "TrustManipulationTests",
vb@3242
   116
    "SyncTests",
krista@3217
   117
    "AppleMailTests",
krista@2642
   118
};
krista@2642
   119
krista@2644
   120
// This file is generated, so magic constants are ok.
krista@3400
   121
int SuiteMaker::num_suites = 50;
krista@2644
   122
krista@2644
   123
void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
krista@3217
   124
    if (strcmp(test_class_name, "MimeTests") == 0)
krista@3217
   125
        *test_suite = new MimeTests(test_class_name, test_home);
krista@3400
   126
    else if (strcmp(test_class_name, "OwnIdentitiesRetrieveTests") == 0)
krista@3400
   127
        *test_suite = new OwnIdentitiesRetrieveTests(test_class_name, test_home);
krista@3217
   128
    else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
krista@3217
   129
        *test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
krista@3121
   130
    else if (strcmp(test_class_name, "UserIdCollisionTests") == 0)
krista@3121
   131
        *test_suite = new UserIdCollisionTests(test_class_name, test_home);
krista@3217
   132
    else if (strcmp(test_class_name, "Engine463Tests") == 0)
krista@3217
   133
        *test_suite = new Engine463Tests(test_class_name, test_home);
krista@3217
   134
    else if (strcmp(test_class_name, "BloblistTests") == 0)
krista@3217
   135
        *test_suite = new BloblistTests(test_class_name, test_home);
krista@3217
   136
    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
krista@3217
   137
        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
krista@3350
   138
    else if (strcmp(test_class_name, "NoOwnIdentWritesOnDecryptTests") == 0)
krista@3350
   139
        *test_suite = new NoOwnIdentWritesOnDecryptTests(test_class_name, test_home);
krista@3217
   140
    else if (strcmp(test_class_name, "I18nTests") == 0)
krista@3217
   141
        *test_suite = new I18nTests(test_class_name, test_home);
krista@3121
   142
    else if (strcmp(test_class_name, "IdentityListTests") == 0)
krista@3121
   143
        *test_suite = new IdentityListTests(test_class_name, test_home);
krista@3217
   144
    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
krista@3217
   145
        *test_suite = new PgpBinaryTests(test_class_name, test_home);
krista@3230
   146
    else if (strcmp(test_class_name, "SubkeyRatingEvalTests") == 0)
krista@3230
   147
        *test_suite = new SubkeyRatingEvalTests(test_class_name, test_home);
krista@3217
   148
    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
krista@3217
   149
        *test_suite = new MessageNullFromTests(test_class_name, test_home);
krista@3217
   150
    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
krista@3217
   151
        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
krista@3217
   152
    else if (strcmp(test_class_name, "StringlistTests") == 0)
krista@3217
   153
        *test_suite = new StringlistTests(test_class_name, test_home);
krista@3217
   154
    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
krista@3217
   155
        *test_suite = new PgpListKeysTests(test_class_name, test_home);
krista@3217
   156
    else if (strcmp(test_class_name, "MessageApiTests") == 0)
krista@3217
   157
        *test_suite = new MessageApiTests(test_class_name, test_home);
krista@3217
   158
    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
krista@3217
   159
        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
krista@3217
   160
    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
krista@3217
   161
        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
krista@3217
   162
    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
krista@3217
   163
        *test_suite = new UserIDAliasTests(test_class_name, test_home);
krista@3244
   164
    else if (strcmp(test_class_name, "SignOnlyTests") == 0)
krista@3244
   165
        *test_suite = new SignOnlyTests(test_class_name, test_home);
krista@3217
   166
    else if (strcmp(test_class_name, "BCCTests") == 0)
krista@3217
   167
        *test_suite = new BCCTests(test_class_name, test_home);
krista@3217
   168
    else if (strcmp(test_class_name, "Engine358Tests") == 0)
krista@3217
   169
        *test_suite = new Engine358Tests(test_class_name, test_home);
krista@3217
   170
    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
krista@3217
   171
        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
krista@3121
   172
    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
krista@3121
   173
        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
krista@3217
   174
    else if (strcmp(test_class_name, "BlacklistTests") == 0)
krista@3217
   175
        *test_suite = new BlacklistTests(test_class_name, test_home);
krista@3217
   176
    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
krista@3217
   177
        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
krista@3217
   178
    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
krista@3217
   179
        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
krista@3217
   180
    else if (strcmp(test_class_name, "SequenceTests") == 0)
krista@3217
   181
        *test_suite = new SequenceTests(test_class_name, test_home);
krista@3121
   182
    else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
krista@3121
   183
        *test_suite = new HeaderKeyImportTests(test_class_name, test_home);
krista@3121
   184
    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
krista@3121
   185
        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
krista@3217
   186
    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
krista@3217
   187
        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
krista@3121
   188
    else if (strcmp(test_class_name, "KeyeditTests") == 0)
krista@3121
   189
        *test_suite = new KeyeditTests(test_class_name, test_home);
krista@3217
   190
    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
krista@3217
   191
        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
krista@3121
   192
    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
krista@3121
   193
        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
krista@3217
   194
    else if (strcmp(test_class_name, "CheckRenewedExpiredKeyTrustStatusTests") == 0)
krista@3217
   195
        *test_suite = new CheckRenewedExpiredKeyTrustStatusTests(test_class_name, test_home);
krista@3217
   196
    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
krista@3217
   197
        *test_suite = new TrustwordsTests(test_class_name, test_home);
krista@3265
   198
    else if (strcmp(test_class_name, "SimpleBodyNotAltTests") == 0)
krista@3265
   199
        *test_suite = new SimpleBodyNotAltTests(test_class_name, test_home);
krista@3217
   200
    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
krista@3217
   201
        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
krista@3217
   202
    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
krista@3217
   203
        *test_suite = new MapAsn1Tests(test_class_name, test_home);
krista@3217
   204
    else if (strcmp(test_class_name, "DecorateTests") == 0)
krista@3217
   205
        *test_suite = new DecorateTests(test_class_name, test_home);
krista@3217
   206
    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
krista@3217
   207
        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
krista@3217
   208
    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
krista@3217
   209
        *test_suite = new CrashdumpTests(test_class_name, test_home);
krista@3217
   210
    else if (strcmp(test_class_name, "StringpairListTests") == 0)
krista@3217
   211
        *test_suite = new StringpairListTests(test_class_name, test_home);
krista@3121
   212
    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
krista@3121
   213
        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
krista@3244
   214
    else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
krista@3244
   215
        *test_suite = new KeyResetMessageTests(test_class_name, test_home);
krista@3255
   216
    else if (strcmp(test_class_name, "KeyAttachmentTests") == 0)
krista@3255
   217
        *test_suite = new KeyAttachmentTests(test_class_name, test_home);
krista@3217
   218
    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
krista@3217
   219
        *test_suite = new TrustManipulationTests(test_class_name, test_home);
vb@3242
   220
    else if (strcmp(test_class_name, "SyncTests") == 0)
vb@3242
   221
        *test_suite = new SyncTests(test_class_name, test_home);
krista@3217
   222
    else if (strcmp(test_class_name, "AppleMailTests") == 0)
krista@3217
   223
        *test_suite = new AppleMailTests(test_class_name, test_home);
krista@2634
   224
}
krista@2644
   225
krista@2644
   226
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
   227
    for (int i = 0; i < num_to_run; i++) {
krista@2644
   228
        Test::Suite* suite = NULL;
krista@2644
   229
        SuiteMaker::suitemaker_build(test_class_names[i], test_home, &suite);
krista@2644
   230
        if (!suite)
krista@2644
   231
            throw std::runtime_error("Could not create a test suite instance."); // FIXME, better error, cleanup, obviously
krista@2644
   232
        test_suites.push_back(suite);
krista@2645
   233
    }
krista@2644
   234
}
krista@2644
   235
void SuiteMaker::suitemaker_buildall(const char* test_home, std::vector<Test::Suite*>& test_suites) {
krista@2644
   236
    SuiteMaker::suitemaker_buildlist(SuiteMaker::all_suites, SuiteMaker::num_suites, test_home, test_suites);
krista@2644
   237
}
krista@2645
   238