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