projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use PBD::tmp_writable_directory to write evoral test file into
[ardour.git]
/
libs
/
evoral
/
test
/
SequenceTest.cpp
diff --git
a/libs/evoral/test/SequenceTest.cpp
b/libs/evoral/test/SequenceTest.cpp
index 6e07776fdb3877d73c0e5bac8437cc0da5facfd1..f6a8363f4d3c882cd054883b24378e91a03b6152 100644
(file)
--- a/
libs/evoral/test/SequenceTest.cpp
+++ b/
libs/evoral/test/SequenceTest.cpp
@@
-1,10
+1,10
@@
#include "SequenceTest.hpp"
#include "SequenceTest.hpp"
-#include "evoral/MIDIParameters.hpp"
#include <cassert>
CPPUNIT_TEST_SUITE_REGISTRATION(SequenceTest);
using namespace std;
#include <cassert>
CPPUNIT_TEST_SUITE_REGISTRATION(SequenceTest);
using namespace std;
+using namespace Evoral;
void
SequenceTest::createTest ()
void
SequenceTest::createTest ()
@@
-29,8
+29,8
@@
SequenceTest::preserveEventOrderingTest ()
);
event->buffer()[0] = MIDI_CMD_CONTROL;
);
event->buffer()[0] = MIDI_CMD_CONTROL;
- event->buffer()[1] = event->time() / 1000;
- event->buffer()[2] = event->time() / 1000;
+ event->buffer()[1] = event->time()
.to_double()
/ 1000;
+ event->buffer()[2] = event->time()
.to_double()
/ 1000;
boost::shared_ptr<Event<Time> > event_ptr(event);
boost::shared_ptr<Event<Time> > event_ptr(event);
@@
-75,7
+75,7
@@
SequenceTest::iteratorSeekTest ()
}
bool on = true;
}
bool on = true;
- for (Sequence<Time>::const_iterator i = seq->begin(
600
); i != seq->end(); ++i) {
+ for (Sequence<Time>::const_iterator i = seq->begin(
Evoral::MusicalTime(600)
); i != seq->end(); ++i) {
if (on) {
CPPUNIT_ASSERT(((const MIDIEvent<Time>&)*i).is_note_on());
CPPUNIT_ASSERT_EQUAL(i->time(), Time((num_notes + 6) * 100));
if (on) {
CPPUNIT_ASSERT(((const MIDIEvent<Time>&)*i).is_note_on());
CPPUNIT_ASSERT_EQUAL(i->time(), Time((num_notes + 6) * 100));
@@
-102,11
+102,11
@@
SequenceTest::controlInterpolationTest ()
static const uint64_t delay = 1000;
static const uint32_t cc_type = 1;
static const uint64_t delay = 1000;
static const uint32_t cc_type = 1;
- boost::shared_ptr<Control> c = seq->control(
MIDI::ContinuousControll
er(cc_type, 1, 1), true);
+ boost::shared_ptr<Control> c = seq->control(
Paramet
er(cc_type, 1, 1), true);
CPPUNIT_ASSERT(c);
CPPUNIT_ASSERT(c);
- double min
, max, normal
;
-
MIDI::controller_range(min, max, normal)
;
+ double min
= 0.0
;
+
double max = 127.0
;
// Make a ramp like /\ from min to max and back to min
c->set_double(min, 0, true);
// Make a ramp like /\ from min to max and back to min
c->set_double(min, 0, true);
@@
-136,7
+136,7
@@
SequenceTest::controlInterpolationTest ()
sink.write(i->time(), i->event_type(), i->size(), i->buffer());
}
CPPUNIT_ASSERT(sink.events.size() == 128 * 2 - 1);
sink.write(i->time(), i->event_type(), i->size(), i->buffer());
}
CPPUNIT_ASSERT(sink.events.size() == 128 * 2 - 1);
- Time last_time
= 0
;
+ Time last_time
(0)
;
int16_t last_value = -1;
bool ascending = true;
for (CCTestSink<Time>::Events::const_iterator i = sink.events.begin();
int16_t last_value = -1;
bool ascending = true;
for (CCTestSink<Time>::Events::const_iterator i = sink.events.begin();