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/signals.cpp | 131 -------------------------------------------------- 1 file changed, 131 deletions(-) delete mode 100644 src/tests/signals.cpp (limited to 'src/tests/signals.cpp') diff --git a/src/tests/signals.cpp b/src/tests/signals.cpp deleted file mode 100644 index 14bbc9c..0000000 --- a/src/tests/signals.cpp +++ /dev/null @@ -1,131 +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 -#include - -using namespace Bu; - -class Thing -{ -public: - Thing() : - iState( 82731 ) - { - } - - virtual ~Thing() - { - } - - void fnc0() - { - sio << iState << ": void fnc0()" << sio.nl; - } - - void fnc1( int a ) - { - sio << iState << ": void fnc1( " << a << " )" << sio.nl; - } - - void fnc2( int a, Bu::String b ) - { - sio << iState << ": void fnc2( " << a << ", \"" << b << "\" )" << sio.nl; - } - - void fnc3( int a, Bu::String b, double c ) - { - sio << iState << ": void fnc3( " << a << ", \"" << b << "\", " << c << " )" << sio.nl; - } - - void fnc4( int a, Bu::String b, double c, char d ) - { - sio << iState << ": void fnc4( " << a << ", \"" << b << "\", " << c << ", '" << d << "' )" << sio.nl; - } - - void fnc5( int a, Bu::String b, double c, char d, long e ) - { - sio << iState << ": void fnc5( " << a << ", \"" << b << "\", " << c << ", '" << d << "', " << e << " )" << sio.nl; - } - -private: - int iState; -}; - -void pfnc0() -{ - sio << ": void pfnc0()" << sio.nl; -} - -void pfnc1( int a ) -{ - sio << ": void pfnc1( " << a << " )" << sio.nl; -} - -void pfnc2( int a, Bu::String b ) -{ - sio << ": void pfnc2( " << a << ", \"" << b << "\" )" << sio.nl; -} - -void pfnc3( int a, Bu::String b, double c ) -{ - sio << ": void pfnc3( " << a << ", \"" << b << "\", " << c << " )" << sio.nl; -} - -void pfnc4( int a, Bu::String b, double c, char d ) -{ - sio << ": void pfnc4( " << a << ", \"" << b << "\", " << c << ", '" << d << "' )" << sio.nl; -} - -void pfnc5( int a, Bu::String b, double c, char d, long e ) -{ - sio << ": void pfnc5( " << a << ", \"" << b << "\", " << c << ", '" << d << "', " << e << " )" << sio.nl; -} - -void callit( Signal0 sig ) -{ - sig(); -} - -int main() -{ - Thing t; - - Signal0 cb0( slot( &t, &Thing::fnc0 ) ); - cb0(); - cb0 = slot( &pfnc0 ); - cb0(); - - Signal1 cb1( slot( &t, &Thing::fnc1 ) ); - cb1( 5 ); - cb1 = slot( &pfnc1 ); - cb1( 5 ); - - Signal2 cb2( slot( &t, &Thing::fnc2 ) ); - cb2( 5, "Hi there" ); - cb2 = slot( &pfnc2 ); - cb2( 5, "Hi there" ); - - Signal3 cb3( slot( &t, &Thing::fnc3 ) ); - cb3( 5, "Hi there", 12.85 ); - cb3 = slot( &pfnc3 ); - cb3( 5, "Hi there", 12.85 ); - - Signal4 cb4( slot( &t, &Thing::fnc4 ) ); - cb4( 5, "Hi there", 12.85, 'z' ); - cb4 = slot( &pfnc4 ); - cb4( 5, "Hi there", 12.85, 'z' ); - - Signal5 cb5( slot( &t, &Thing::fnc5 ) ); - cb5( 5, "Hi there", 12.85, 'z', 849 ); - cb5 = slot( &pfnc5 ); - cb5( 5, "Hi there", 12.85, 'z', 849 ); - -// Signal1 cb1( slot( &t, &Thing::fnc1 ) ); -// sio << "Result: " << cb1( 5 ) << sio.nl; -} - -- cgit v1.2.3