added post- and pre- increment tests

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Jason Stewart 2008-04-03 12:03:04 +00:00
commit da4c710d60

View file

@ -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 @@ $op->{k} = 37;
ok((40 == $op + 3),
"addition");
($op + 3)->Print();
$op->{k} = 22;
ok((10 == (32 - $op)),
@ -36,3 +34,22 @@ ok((10 == (32 - $op)),
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");