From: <jas...@us...> - 2008-04-03 12:03:08
|
Revision: 10340 http://swig.svn.sourceforge.net/swig/?rev=10340&view=rev Author: jason_e_stewart Date: 2008-04-03 05:03:04 -0700 (Thu, 03 Apr 2008) Log Message: ----------- added post- and pre- increment tests Modified Paths: -------------- trunk/Examples/test-suite/perl5/operator_overload_break_runme.pl Modified: trunk/Examples/test-suite/perl5/operator_overload_break_runme.pl =================================================================== --- trunk/Examples/test-suite/perl5/operator_overload_break_runme.pl 2008-04-03 11:59:26 UTC (rev 10339) +++ trunk/Examples/test-suite/perl5/operator_overload_break_runme.pl 2008-04-03 12:03:04 UTC (rev 10340) @@ -1,6 +1,6 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 6; +use Test::More tests => 9; use operator_overload_break; @@ -27,8 +27,6 @@ ok((40 == $op + 3), "addition"); -($op + 3)->Print(); - $op->{k} = 22; ok((10 == (32 - $op)), @@ -36,3 +34,22 @@ ok_not((3 == $op), 'not equal'); + +$op->{k} = 3; + +++$op; + +ok(($op == 4), + "pre-increment operator"); + +$op++; + +ok(($op == 5), + "post-increment operator"); + +$op++; + +$op++; + +ok(($op == 7), + "multiple post-increments"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |