summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-01-06 19:39:56 +0000
committerDavid Robillard <d@drobilla.net>2007-01-06 19:39:56 +0000
commit69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f (patch)
tree68fd1ea83beedaaaa97846ed09240a3585b2d931 /src/libs/engine/tests
parent2122a857662203936a04a39df7d0e1ad1db82853 (diff)
downloadingen-69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f.tar.gz
ingen-69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f.tar.bz2
ingen-69c5e7fe16b7d9d08db81a6d5e2762f0be3b081f.zip
Added ability to get Raul Thread for current calling context.
Strong threading assertions. Flowcanvas port removal fixes. Patch port destruction. Code cleanups, bug fixes. git-svn-id: http://svn.drobilla.net/lad/ingen@234 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/tests')
-rw-r--r--src/libs/engine/tests/Makefile.am6
-rw-r--r--src/libs/engine/tests/queue_test.cpp47
2 files changed, 1 insertions, 52 deletions
diff --git a/src/libs/engine/tests/Makefile.am b/src/libs/engine/tests/Makefile.am
index 0da5ee09..993c9831 100644
--- a/src/libs/engine/tests/Makefile.am
+++ b/src/libs/engine/tests/Makefile.am
@@ -3,9 +3,8 @@ if BUILD_UNIT_TESTS
AM_CXXFLAGS = @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ -I../../common
common_ldadd = @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ -lrt
node_tree_test_LDADD = $(common_ldadd)
-queue_test_LDADD = $(common_ldadd)
-bin_PROGRAMS = node_tree_test queue_test list_test
+bin_PROGRAMS = node_tree_test list_test
list_test_SOURCES = \
../List.h \
@@ -14,7 +13,4 @@ list_test_SOURCES = \
node_tree_test_SOURCES = \
node_tree_test.cpp
-queue_test_SOURCES = \
- queue_test.cpp
-
endif # BUILD_UNIT_TESTS
diff --git a/src/libs/engine/tests/queue_test.cpp b/src/libs/engine/tests/queue_test.cpp
deleted file mode 100644
index 3381a329..00000000
--- a/src/libs/engine/tests/queue_test.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#include <iostream>
-#include <string>
-#include "../../common/Queue.h"
-
-using std::string; using std::cerr; using std::cout; using std::endl;
-
-
-int main()
-{
- Queue<int> q(10);
-
- cout << "New queue. Should be empty: " << q.is_empty() << endl;
- cout << "Capacity: " << q.capacity() << endl;
- cout << "Fill: " << q.fill() << endl;
-
- for (uint i=0; i < 5; ++i) {
- q.push(i);
- assert(!q.is_full());
- q.pop();
- }
- cout << "Pushed and popped 5 elements. Queue should be empty: " << q.is_empty() << endl;
- cout << "Fill: " << q.fill() << endl;
-
- for (uint i=10; i < 20; ++i) {
- q.push(i);
- }
- cout << "Pushed 10 elements. Queue should be full: " << q.is_full() << endl;
- cout << "Fill: " << q.fill() << endl;
-
- cout << "The digits 10->19 should print: " << endl;
- while (!q.is_empty()) {
- int foo = q.pop();
- cout << "Popped: " << foo << endl;
- }
- cout << "Queue should be empty: " << q.is_empty() << endl;
- cout << "Fill: " << q.fill() << endl;
-
- cout << "Attempting to add eleven elements to queue of size 10. Only first 10 should succeed:" << endl;
- for (uint i=20; i <= 39; ++i) {
- cout << i;
- cout << " - Fill: " << q.fill();
- cout << ", is full: " << q.is_full();
- cout << ", succeeded: " << q.push(i) << endl;
- }
-
- return 0;
-}