From e343345cf54172720f3494ccef87d62b2c688d0a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 9 Feb 2007 22:39:56 +0000 Subject: 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 --- src/libs/engine/tests/Makefile.am | 10 ++-- src/libs/engine/tests/list_test.cpp | 93 ------------------------------------- 2 files changed, 3 insertions(+), 100 deletions(-) delete mode 100644 src/libs/engine/tests/list_test.cpp (limited to 'src/libs/engine/tests') 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 -#include - -using std::cout; using std::endl; - - -int main() -{ - List l; - - l.push_back(new ListNode(1)); - l.push_back(new ListNode(2)); - l.push_back(new ListNode(3)); - l.push_back(new ListNode(4)); - l.push_back(new ListNode(5)); - l.push_back(new ListNode(6)); - l.push_back(new ListNode(7)); - l.push_back(new ListNode(8)); - - cout << "List:" << endl; - for (List::iterator i = l.begin(); i != l.end(); ++i) { - cout << *i << endl; - } - cout << endl; - - - for (List::iterator i = l.begin(); i != l.end(); ++i) { - if ((*i) == 4) - l.remove(i); - } - - std::cerr << "Removed 4 (by iterator)...\n"; - for (List::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::iterator i = l.begin(); i != l.end(); ++i) { - cout << *i << endl; - } - cout << endl; - - for (List::iterator i = l.begin(); i != l.end(); ++i) { - if ((*i) == 2) - l.remove(i); - } - - std::cerr << "Removed 2 (head) (by iterator)...\n"; - for (List::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::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::iterator i = l.begin(); i != l.end(); ++i) { - cout << *i << endl; - } - cout << endl; - - for (List::iterator i = l.begin(); i != l.end(); ++i) { - if ((*i) == 7) - l.remove(i); - } - - std::cerr << "Removed 7 (tail) (by iterator)...\n"; - for (List::iterator i = l.begin(); i != l.end(); ++i) { - cout << *i << endl; - } - cout << endl; - - List r; - r.push_back(new ListNode(9)); - r.remove(9); - std::cerr << "Should not see ANY numbers:\n"; - for (List::iterator i = r.begin(); i != r.end(); ++i) { - cout << *i << endl; - } - return 0; -} -- cgit v1.2.1