Revision 10:0c1c60654125 TestDefaults.cpp

View differences:

TestDefaults.cpp
54 54
Tester::TestRegistrar<TestDefaultParameters>
55 55
TestDefaultParameters::m_registrar("E2 Inconsistent default parameters");
56 56

  
57
Tester::TestRegistrar<TestLengthyConstructor>
58
TestLengthyConstructor::m_registrar("E3 Lengthy constructor");
59

  
60 57
static const size_t _step = 1000;
61 58

  
62 59
Test::Results
......
154 151

  
155 152
    return r;
156 153
}
157

  
158
Test::Results
159
TestLengthyConstructor::test(string key, Options options)
160
{
161
    time_t t0 = time(0);
162
    auto_ptr<Plugin> p(load(key));
163
    time_t t1 = time(0);
164
    Results r;
165
    if (t1 - t0 > 1) r.push_back(warning("Constructor takes some time to run: work should be deferred to initialise?"));
166
    return r;
167
}
168

  

Also available in: Unified diff