Revision 8:3019cb6b538d TestMultipleRuns.cpp

View differences:

TestMultipleRuns.cpp
62 62
static const size_t _step = 1000;
63 63

  
64 64
Test::Results
65
TestDistinctRuns::test(string key)
65
TestDistinctRuns::test(string key, Options options)
66 66
{
67 67
    Plugin::FeatureSet f[2];
68 68
    int rate = 44100;
......
89 89
    if (data) destroyTestAudio(data, channels);
90 90

  
91 91
    if (!(f[0] == f[1])) {
92
        Result res = warning("Consecutive runs with separate instances produce different results");
93
        dump(res, f[0], f[1]);
92
        Result res;
93
        string message = "Consecutive runs with separate instances produce different results";
94
        if (options & NonDeterministic) res = note(message);
95
        else res = error(message);
96
        if (options & Verbose) dump(res, f[0], f[1]);
94 97
        r.push_back(res);
95 98
    } else {
96 99
        r.push_back(success());
......
100 103
}
101 104

  
102 105
Test::Results
103
TestReset::test(string key)
106
TestReset::test(string key, Options options)
104 107
{
105 108
    Plugin::FeatureSet f[2];
106 109
    int rate = 44100;
......
129 132
    if (data) destroyTestAudio(data, channels);
130 133

  
131 134
    if (!(f[0] == f[1])) {
132
        Result res = warning("Consecutive runs with the same instance (using reset) produce different results");
133
        dump(res, f[0], f[1]);
135
        string message = "Consecutive runs with the same instance (using reset) produce different results";
136
        Result res;
137
        if (options & NonDeterministic) res = note(message);
138
        else res = error(message);
139
        if (options & Verbose) dump(res, f[0], f[1]);
134 140
        r.push_back(res);
135 141
    } else {
136 142
        r.push_back(success());
......
140 146
}
141 147

  
142 148
Test::Results
143
TestInterleavedRuns::test(string key)
149
TestInterleavedRuns::test(string key, Options options)
144 150
{
145 151
    Plugin::FeatureSet f[2];
146 152
    int rate = 44100;
......
178 184
    if (data) destroyTestAudio(data, channels);
179 185

  
180 186
    if (!(f[0] == f[1])) {
181
        Result res = warning("Simultaneous runs with separate instances produce different results");
182
        dump(res, f[0], f[1]);
187
        string message = "Simultaneous runs with separate instances produce different results";
188
        Result res;
189
        if (options & NonDeterministic) res = note(message);
190
        else res = error(message);
191
        if (options & Verbose) dump(res, f[0], f[1]);
183 192
        r.push_back(res);
184 193
    } else {
185 194
        r.push_back(success());
......
189 198
}
190 199

  
191 200
Test::Results
192
TestDifferentStartTimes::test(string key)
201
TestDifferentStartTimes::test(string key, Options options)
193 202
{
194 203
    Plugin::FeatureSet f[2];
195 204
    int rate = 44100;
......
217 226
    if (data) destroyTestAudio(data, channels);
218 227

  
219 228
    if (f[0] == f[1]) {
220
        Result res = warning("Consecutive runs with different starting timestamps produce the same result");
221
        dump(res, f[0], f[1]);
229
        string message = "Consecutive runs with different starting timestamps produce the same result";
230
        Result res;
231
        if (options & NonDeterministic) res = note(message);
232
        else res = error(message);
233
        if (options & Verbose) dump(res, f[0], f[1]);
222 234
        r.push_back(res);
223 235
    } else {
224 236
        r.push_back(success());

Also available in: Unified diff