commit 42f4baa50abf0cd0ee73eac18aab0ba219803a24
parent dae36026f7c419189ae048e3003cba508e3b89ce
Author: michiboo <chanmickyyun@gmail.com>
Date: Tue, 23 Jul 2019 00:29:45 +0300
fix trigger test
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Synth/WatchPoint.cpp b/src/Synth/WatchPoint.cpp
@@ -155,6 +155,7 @@ bool WatchManager::trigger_active(const char *id) const
for(int i=0; i<MAX_WATCH; ++i)
if(!strcmp(active_list[i], id))
return trigger[i];
+ return false;
}
int WatchManager::samples(const char *id) const
diff --git a/src/Tests/TriggerTest.h b/src/Tests/TriggerTest.h
@@ -123,21 +123,20 @@ class TriggerTest:public CxxTest::TestSuite
TS_ASSERT(!tr->hasNext());
w->add_watch("noteout");
w->add_watch("noteout1");
+ TS_ASSERT(!w->trigger_active("noteout"));
+ TS_ASSERT(!w->trigger_active("noteout1"));
note->noteout(outL, outR);
sampleCount += synth->buffersize;
- w->tick();
note->noteout(outL, outR);
sampleCount += synth->buffersize;
- w->tick();
TS_ASSERT(w->trigger_active("noteout1"));
TS_ASSERT(w->trigger_active("noteout"));
note->noteout(outL, outR);
sampleCount += synth->buffersize;
- w->tick();
- TS_ASSERT_EQUALS(string("noteout1"), tr->read());
note->noteout(outL, outR);
sampleCount += synth->buffersize;
w->tick();
+ TS_ASSERT_EQUALS(string("noteout1"), tr->read());
while(!note->finished()) {
note->noteout(outL, outR);