diff options
Diffstat (limited to 'Build/source/utils/asymptote/tests/arith/integer.asy')
-rw-r--r-- | Build/source/utils/asymptote/tests/arith/integer.asy | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/tests/arith/integer.asy b/Build/source/utils/asymptote/tests/arith/integer.asy index a402ca58955..b5c337d2733 100644 --- a/Build/source/utils/asymptote/tests/arith/integer.asy +++ b/Build/source/utils/asymptote/tests/arith/integer.asy @@ -12,4 +12,12 @@ EndTest(); StartTest("integer division"); assert(4/2==2); EndTest(); +StartTest("integer self ops"); +{ int x = 3; assert(++x==4); assert(x==4); } +{ int x = 3; assert(--x==2); assert(x==2); } +{ int x = 3; assert((x+=7) == 10); assert(x==10); } +{ int x = 3; assert((x-=7) == -4); assert(x==-4); } +{ int x = 3; assert((x*=7) == 21); assert(x==21); } +{ int x = 10; assert((x%=4) == 2); assert(x==2); } +EndTest(); |