summaryrefslogtreecommitdiff
path: root/libs/evoral/test/NoteTest.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-10-25 13:13:51 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-11-02 16:32:18 -0600
commita855119bdd94aad90f4cfec3066a367b0675a8e9 (patch)
tree6e7d52a5df62153ee312de3fc45bdc151445e0e7 /libs/evoral/test/NoteTest.cc
parent63b909211d8a0f736da61d472a96700065d9c589 (diff)
rename all Evoral source from .(hpp|cpp)$ to .(h|cc)
Diffstat (limited to 'libs/evoral/test/NoteTest.cc')
-rw-r--r--libs/evoral/test/NoteTest.cc33
1 files changed, 33 insertions, 0 deletions
diff --git a/libs/evoral/test/NoteTest.cc b/libs/evoral/test/NoteTest.cc
new file mode 100644
index 0000000000..43e599d743
--- /dev/null
+++ b/libs/evoral/test/NoteTest.cc
@@ -0,0 +1,33 @@
+#include "NoteTest.hpp"
+#include "temporal/beats.h"
+#include "evoral/Note.h"
+#include <stdlib.h>
+
+CPPUNIT_TEST_SUITE_REGISTRATION (NoteTest);
+
+using namespace Evoral;
+
+typedef Temporal::Beats Time;
+
+void
+NoteTest::copyTest ()
+{
+ Note<Time> a(0, Time(1.0), Time(2.0), 60, 0x40);
+ Note<Time> b(a);
+ CPPUNIT_ASSERT (a == b);
+
+ // Broken due to event double free!
+ // Note<Time> c(1, Beats(3.0), Beats(4.0), 61, 0x41);
+ // c = a;
+ // CPPUNIT_ASSERT (a == c);
+}
+
+void
+NoteTest::idTest ()
+{
+ Note<Time> a(0, Time(1.0), Time(2.0), 60, 0x40);
+ CPPUNIT_ASSERT_EQUAL (-1, a.id());
+
+ a.set_id(1234);
+ CPPUNIT_ASSERT_EQUAL (1234, a.id());
+}