From 4b9289cfb260f4bcecaf23a810584ef6ef8e8501 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 30 Mar 2011 22:33:41 +0000 Subject: Ok, string stuff is working much, much better, a load of new unit tests have been added, and I deleted a whole slew of stupid old tests that I don't need. --- src/tests/list.cpp | 77 ------------------------------------------------------ 1 file changed, 77 deletions(-) delete mode 100644 src/tests/list.cpp (limited to 'src/tests/list.cpp') diff --git a/src/tests/list.cpp b/src/tests/list.cpp deleted file mode 100644 index aa3d32d..0000000 --- a/src/tests/list.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2007-2011 Xagasoft, All rights reserved. - * - * This file is part of the libbu++ library and is released under the - * terms of the license contained in the file LICENSE. - */ - -#include "bu/list.h" -#include - -typedef struct Bob -{ - int nID; -} Bob; - -int main() -{ - Bu::List l; - - l.append( 0 ); - - for( int j = 3; j <= 21; j += 3 ) - { - l.append( j ); - l.prepend( -j ); - } - - { - Bu::List::iterator i = l.begin(); - Bu::List::iterator j = i; - int a, b; - a = *j; - printf("end: %s\n", (j != l.end())?"no":"yes"); - j--; - printf("end: %s\n", (j != l.end())?"no":"yes"); - j++; - printf("end: %s\n", (j != l.end())?"no":"yes"); - i = j; - b = *i; - printf("%d -> %d\n", a, b ); - } - - for( Bu::List::iterator i = l.begin(); i != l.end(); i++ ) - { - printf("%d ", *i ); - } - printf("\n"); - for( Bu::List::iterator i = l.begin(); i != l.end(); i++ ) - { - Bu::List::iterator j = i; j--; - l.erase( i ); - i = j; - if( i != l.end() ) - printf("!%d ", *i ); - } - - printf("\n\n"); - - Bu::List lb; - for( int j = 0; j < 10; j++ ) - { - Bob b; - b.nID = j; - lb.append( b ); - } - - const Bu::List rb = lb; - - for( Bu::List::const_iterator i = rb.begin(); i != rb.end(); i++ ) - { - //i->nID += 2; - //(*i).nID = 4; - printf("%d ", i->nID ); - } - printf("\n\n"); -} - -- cgit v1.2.3