Revision 4:d8724c5a6d83 TestOutputs.cpp

View differences:

TestOutputs.cpp
40 40
#include "TestOutputs.h"
41 41

  
42 42
#include <vamp-hostsdk/Plugin.h>
43
#include <vamp-hostsdk/PluginLoader.h>
43 44
using namespace Vamp;
45
using namespace Vamp::HostExt;
44 46

  
45 47
#include <set>
46 48
#include <memory>
......
49 51
#include <cmath>
50 52

  
51 53
Tester::TestRegistrar<TestOutputNumbers>
52
TestOutputNumbers::m_registrar("Output number mismatching");
54
TestOutputNumbers::m_registrar("B1 Output number mismatching");
53 55

  
54 56
Tester::TestRegistrar<TestTimestamps>
55
TestTimestamps::m_registrar("Invalid or dubious timestamp usage");
57
TestTimestamps::m_registrar("B2 Invalid or dubious timestamp usage");
56 58

  
57 59
static const size_t _step = 1000;
58 60

  
......
87 89
         i != fs.end(); ++i) {
88 90
        int o = i->first;
89 91
        used.insert(o);
90
        if (o < 0 || o >= outputs.size()) {
92
        if (o < 0 || o >= (int)outputs.size()) {
91 93
            r.push_back(error("Data returned on nonexistent output"));
92 94
        }
93 95
    }
94
    for (int o = 0; o < outputs.size(); ++o) {
96
    for (int o = 0; o < (int)outputs.size(); ++o) {
95 97
        if (used.find(o) == used.end()) {
96
            r.push_back(note("No results returned for one or more outputs"));       }
98
            r.push_back(note("No results returned for one or more outputs")); 
99
        }
97 100
    }
98 101
                
99 102
    return r;
......
103 106
TestTimestamps::test(string key)
104 107
{
105 108
    int rate = 44100;
106
    auto_ptr<Plugin> p(load(key, rate));
109

  
110
    // we want to be sure that a buffer size adapter is not used:
111
    auto_ptr<Plugin> p(PluginLoader::getInstance()->loadPlugin
112
                       (key, rate, PluginLoader::ADAPT_ALL_SAFE));
113

  
107 114
    Plugin::FeatureSet f;
108 115
    Results r;
109 116
    float **data = 0;
......
111 118
    size_t step = 0, block = 0;
112 119
    size_t count = 100;
113 120

  
114
    //!!! want to ensure buffer size adapter is not used:
115 121
    if (!initDefaults(p.get(), channels, step, block, r)) return r;
116 122
    if (!data) data = createTestAudio(channels, block, count);
117 123
    for (size_t i = 0; i < count; ++i) {

Also available in: Unified diff