summaryrefslogtreecommitdiff
path: root/test/lv2.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-02-15 17:38:51 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-02-15 17:38:51 +0100
commit2687a6cfa48322c62dfd0e92b1ffffbe3b10bd47 (patch)
tree68358af2d2df14241ea87d241fbcde0bb069509d /test/lv2.cc
parent011264c9f5ad6af069ee1b58009cc7774a3f2463 (diff)
Use CPPUNIT_ASSERT_EQUAL instead of just CPPUNIT_ASSERT
Diffstat (limited to 'test/lv2.cc')
-rw-r--r--test/lv2.cc62
1 files changed, 31 insertions, 31 deletions
diff --git a/test/lv2.cc b/test/lv2.cc
index c51d501..bfac1b8 100644
--- a/test/lv2.cc
+++ b/test/lv2.cc
@@ -65,13 +65,13 @@ public:
LV2TestHost h(LV2_PATH);
res = h.open(DG_URI);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.verify();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.close();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
}
void run_no_ports_connected()
@@ -81,13 +81,13 @@ public:
LV2TestHost h("/home/deva/docs/c/drumgizmo/install/lib/lv2");
res = h.open(DG_URI);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.verify();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.createInstance();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
const char config_fmt[] =
"<config>\n"
@@ -123,21 +123,21 @@ public:
);
res = h.loadConfig(config, strlen(config));
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
// run for 1 samples to trigger kit loading
res = h.run(1);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
sleep(1); // wait for kit to get loaded (async),
res = h.run(100);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.destroyInstance();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.close();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
}
void run_no_output_ports_connected()
@@ -147,13 +147,13 @@ public:
LV2TestHost h("/home/deva/docs/c/drumgizmo/install/lib/lv2");
res = h.open(DG_URI);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.verify();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.createInstance();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
const char config_fmt[] =
"<config>\n"
@@ -189,29 +189,29 @@ public:
);
res = h.loadConfig(config, strlen(config));
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
// Port buffers:
char sequence_buffer[4096];
LV2TestHost::Sequence seq(sequence_buffer, sizeof(sequence_buffer));
res = h.connectPort(0, seq.data());
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
// run for 1 samples to trigger kit loading
res = h.run(1);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
sleep(1); // wait for kit to get loaded (async),
seq.addMidiNote(5, 1, 127);
res = h.run(100);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.destroyInstance();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.close();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
}
void test1()
@@ -221,13 +221,13 @@ public:
LV2TestHost h("/home/deva/docs/c/drumgizmo/install/lib/lv2");
res = h.open(DG_URI);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.verify();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.createInstance();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
const char config_fmt[] =
"<config>\n"
@@ -263,7 +263,7 @@ public:
);
res = h.loadConfig(config, strlen(config));
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
// Port buffers:
char sequence_buffer[4096];
@@ -271,24 +271,24 @@ public:
LV2TestHost::Sequence seq(sequence_buffer, sizeof(sequence_buffer));
res = h.connectPort(0, seq.data());
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
for(int i = 1; i <= 16; i++) {
memset(pcm_buffer, 1, sizeof(pcm_buffer));
res += h.connectPort(i, pcm_buffer[i-1]);
}
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
// run for 1 samples to trigger kit loading
res = h.run(1);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
sleep(1); // wait for kit to get loaded (async),
/*
seq.addMidiNote(5, 1, 127);
for(int i = 0; i < 10; i++) {
res = h.run(10);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
printf("Iteration:\n");
for(int k = 0; k < 4; k++) {
@@ -304,7 +304,7 @@ public:
seq.addMidiNote(5, 1, 127);
res = h.run(10);
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
union {
float f;
@@ -321,10 +321,10 @@ public:
seq.clear();
res = h.destroyInstance();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
res = h.close();
- CPPUNIT_ASSERT(res == 0);
+ CPPUNIT_ASSERT_EQUAL(res, 0);
}
};