commit ea78c1a661eaefdaa3eaeabbd51c2c58fcda1164
parent b12f7adc3c5f0b1e0cb9b71a94570da3226b8639
Author: michiboo <chanmickyyun@gmail.com>
Date: Thu, 20 Jun 2019 12:04:20 +0300
fix watch point test
Diffstat:
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp
@@ -359,7 +359,7 @@ static const Ports automate_ports = {
static const Ports watchPorts = {
{"add:s", rDoc("Add synthesis state to watch"), 0,
rBegin;
- if(!m->watcher.is_active(rtosc_argument(msg,0).s))
+ if(!m->watcher.active(rtosc_argument(msg,0).s))
m->watcher.add_watch(rtosc_argument(msg,0).s);
rEnd},
};
diff --git a/src/Tests/WatchTest.h b/src/Tests/WatchTest.h
@@ -30,6 +30,7 @@
#include "../Misc/Time.h"
#include "../Params/LFOParams.h"
#include "../Synth/LFO.h"
+#include "../Synth/SynthNote.h"
#include <unistd.h>
using namespace std;
using namespace zyn;
@@ -52,6 +53,7 @@ class WatchTest:public CxxTest::TestSuite
w = new WatchManager(tr);
par = new LFOParams;
l = new LFO(*par, 440.0, *at, w);
+
}
void tearDown() {
@@ -71,10 +73,13 @@ class WatchTest:public CxxTest::TestSuite
{
TS_ASSERT(!tr->hasNext());
w->add_watch("out");
- l->lfoout();
+ for(int i = 0; i < 64; ++i)
+ l->lfoout();
+
w->tick();
TS_ASSERT(tr->hasNext());
TS_ASSERT_EQUALS(string("out"), tr->read());
TS_ASSERT(!tr->hasNext());
}
+
};