From: Norbert Buchmuller Date: Wed, 26 Nov 2008 22:24:43 +0000 (+0000) Subject: Removed a wrong test (tested for overloaded stringification). X-Git-Tag: v1.70~253 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5ebfe5f2079f618cf5745278411bdf2a8f6b0075;p=dbsrgits%2FSQL-Abstract.git Removed a wrong test (tested for overloaded stringification). Simplified a test for blessed objects. --- diff --git a/t/02where.t b/t/02where.t index 85a0e8b..b93b79f 100644 --- a/t/02where.t +++ b/t/02where.t @@ -11,7 +11,7 @@ use SQL::Abstract; # Make sure to test the examples, since having them break is somewhat # embarrassing. :-( -my $not_stringifiable = SQLA::NotStringifiable->new(); +my $not_stringifiable = bless {}, 'SQLA::NotStringifiable'; my @handle_tests = ( { @@ -183,12 +183,6 @@ my @handle_tests = ( }, { - where => { foo => SQLA::FourtyTwo->new(), }, - stmt => " WHERE ( foo = ? )", - bind => [ 'The Life, the Universe and Everything.' ], - }, - - { where => { foo => $not_stringifiable, }, stmt => " WHERE ( foo = ? )", bind => [ $not_stringifiable ], @@ -209,42 +203,3 @@ dies_ok { my $sql = SQL::Abstract->new; $sql->where({ foo => { '>=' => [] }},); }; - - - -#====================================================================== -package SQLA::FourtyTwo; # testing stringification of arguments -#====================================================================== - -use strict; -use warnings; - -use overload - '""' => \&to_str; - -sub new -{ - bless {}, shift; -} - -sub to_str -{ - return "The Life, the Universe and Everything."; -} - -1; - - -#====================================================================== -package SQLA::NotStringifiable; # testing stringification of arguments -#====================================================================== - -use strict; -use warnings; - -sub new -{ - bless {}, shift; -} - -1;