summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-09 22:39:56 +0000
committerDavid Robillard <d@drobilla.net>2007-02-09 22:39:56 +0000
commite343345cf54172720f3494ccef87d62b2c688d0a (patch)
tree67c6b3f95e9393110f78b6fa0cf44cbd12f935a4 /src/libs/engine/tests
parentc50fe49fea7e32b3194b163b77ee5a52480ffa33 (diff)
downloadingen-e343345cf54172720f3494ccef87d62b2c688d0a.tar.gz
ingen-e343345cf54172720f3494ccef87d62b2c688d0a.tar.bz2
ingen-e343345cf54172720f3494ccef87d62b2c688d0a.zip
Moved Deletable (formerly MaidObject), List, and Array from Ingen to Raul.
git-svn-id: http://svn.drobilla.net/lad/ingen@294 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/tests')
-rw-r--r--src/libs/engine/tests/Makefile.am10
-rw-r--r--src/libs/engine/tests/list_test.cpp93
2 files changed, 3 insertions, 100 deletions
diff --git a/src/libs/engine/tests/Makefile.am b/src/libs/engine/tests/Makefile.am
index 993c9831..c9d1e0c9 100644
--- a/src/libs/engine/tests/Makefile.am
+++ b/src/libs/engine/tests/Makefile.am
@@ -1,14 +1,10 @@
if BUILD_UNIT_TESTS
-AM_CXXFLAGS = @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ -I../../common
-common_ldadd = @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ -lrt
+AM_CXXFLAGS = @JACK_CFLAGS@ @RAUL_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ -I../../common
+common_ldadd = @JACK_LIBS@ @RAUL_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ -lrt
node_tree_test_LDADD = $(common_ldadd)
-bin_PROGRAMS = node_tree_test list_test
-
-list_test_SOURCES = \
- ../List.h \
- list_test.cpp
+bin_PROGRAMS = node_tree_test
node_tree_test_SOURCES = \
node_tree_test.cpp
diff --git a/src/libs/engine/tests/list_test.cpp b/src/libs/engine/tests/list_test.cpp
deleted file mode 100644
index d2f91c9d..00000000
--- a/src/libs/engine/tests/list_test.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-#include "../List.h"
-#include <iostream>
-#include <cstddef>
-
-using std::cout; using std::endl;
-
-
-int main()
-{
- List<int> l;
-
- l.push_back(new ListNode<int>(1));
- l.push_back(new ListNode<int>(2));
- l.push_back(new ListNode<int>(3));
- l.push_back(new ListNode<int>(4));
- l.push_back(new ListNode<int>(5));
- l.push_back(new ListNode<int>(6));
- l.push_back(new ListNode<int>(7));
- l.push_back(new ListNode<int>(8));
-
- cout << "List:" << endl;
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- cout << *i << endl;
- }
- cout << endl;
-
-
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- if ((*i) == 4)
- l.remove(i);
- }
-
- std::cerr << "Removed 4 (by iterator)...\n";
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- cout << *i << endl;
- }
- cout << endl;
-
- l.remove(1);
-
- std::cerr << "Removed 1 (head) (by value)...\n";
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- cout << *i << endl;
- }
- cout << endl;
-
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- if ((*i) == 2)
- l.remove(i);
- }
-
- std::cerr << "Removed 2 (head) (by iterator)...\n";
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- cout << *i << endl;
- }
- cout << endl;
-
- l.remove(5);
-
- std::cerr << "Removed 5 (by value)...\n";
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- cout << *i << endl;
- }
- cout << endl;
-
- l.remove(8);
-
- std::cerr << "Removed 8 (tail) (by value)...\n";
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- cout << *i << endl;
- }
- cout << endl;
-
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- if ((*i) == 7)
- l.remove(i);
- }
-
- std::cerr << "Removed 7 (tail) (by iterator)...\n";
- for (List<int>::iterator i = l.begin(); i != l.end(); ++i) {
- cout << *i << endl;
- }
- cout << endl;
-
- List<int> r;
- r.push_back(new ListNode<int>(9));
- r.remove(9);
- std::cerr << "Should not see ANY numbers:\n";
- for (List<int>::iterator i = r.begin(); i != r.end(); ++i) {
- cout << *i << endl;
- }
- return 0;
-}