Revision 8:3019cb6b538d TestDefaults.cpp

View differences:

TestDefaults.cpp
60 60
static const size_t _step = 1000;
61 61

  
62 62
Test::Results
63
TestDefaultProgram::test(string key)
63
TestDefaultProgram::test(string key, Options options)
64 64
{
65 65
    Plugin::FeatureSet f[2];
66 66
    int rate = 44100;
......
91 91
    if (data) destroyTestAudio(data, channels);
92 92

  
93 93
    if (!(f[0] == f[1])) {
94
        Result res = warning("Explicitly setting current program to its supposed current value changes the results");
95
        dump(res, f[0], f[1]);
94
        string message = "Explicitly setting current program to its supposed current value changes the results";
95
        Result res;
96
        if (options & NonDeterministic) res = note(message);
97
        else res = error(message);
98
        if (options & Verbose) dump(res, f[0], f[1]);
96 99
        r.push_back(res);
97 100
    } else {
98 101
        r.push_back(success());
......
102 105
}
103 106

  
104 107
Test::Results
105
TestDefaultParameters::test(string key)
108
TestDefaultParameters::test(string key, Options options)
106 109
{
107 110
    Plugin::FeatureSet f[2];
108 111
    int rate = 44100;
......
139 142
    if (data) destroyTestAudio(data, channels);
140 143

  
141 144
    if (!(f[0] == f[1])) {
142
        Result res = warning("Explicitly setting parameters to their supposed default values changes the results");
143
        dump(res, f[0], f[1]);
145
        string message = "Explicitly setting parameters to their supposed default values changes the results";
146
        Result res;
147
        if (options & NonDeterministic) res = note(message);
148
        else res = error(message);
149
        if (options & Verbose) dump(res, f[0], f[1]);
144 150
        r.push_back(res);
145 151
    } else {
146 152
        r.push_back(success());
......
150 156
}
151 157

  
152 158
Test::Results
153
TestLengthyConstructor::test(string key)
159
TestLengthyConstructor::test(string key, Options options)
154 160
{
155 161
    time_t t0 = time(0);
156 162
    auto_ptr<Plugin> p(load(key));

Also available in: Unified diff