Added tests for inc/dec ops.
authorDavid Anderson <dvander@alliedmods.net>
Sun Jul 01 18:39:11 2012 -0700 (2012-07-01)
changeset 2403c6a312213b
parent 23 8a31742781c1
child 25 23e8b3d8e4e6
Added tests for inc/dec ops.
tests/prototype/postinc-array.sp
tests/prototype/postinc-local.sp
tests/prototype/postinc-ref.sp
tests/prototype/preinc-array.sp
tests/prototype/preinc-local.sp
tests/prototype/preinc-ref.sp
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/prototype/postinc-array.sp	Sun Jul 01 18:39:11 2012 -0700
     1.3 @@ -0,0 +1,5 @@
     1.4 +main()
     1.5 +{
     1.6 +    new x[5];
     1.7 +    return x[3]++;
     1.8 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tests/prototype/postinc-local.sp	Sun Jul 01 18:39:11 2012 -0700
     2.3 @@ -0,0 +1,5 @@
     2.4 +main()
     2.5 +{
     2.6 +    new i = 0;
     2.7 +    return i++;
     2.8 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tests/prototype/postinc-ref.sp	Sun Jul 01 18:39:11 2012 -0700
     3.3 @@ -0,0 +1,10 @@
     3.4 +f(&a)
     3.5 +{
     3.6 +    return a++;
     3.7 +}
     3.8 +
     3.9 +main()
    3.10 +{
    3.11 +    new i = 0;
    3.12 +    return f(i);
    3.13 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tests/prototype/preinc-array.sp	Sun Jul 01 18:39:11 2012 -0700
     4.3 @@ -0,0 +1,5 @@
     4.4 +main()
     4.5 +{
     4.6 +    new x[5];
     4.7 +    return ++x[3];
     4.8 +}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/tests/prototype/preinc-local.sp	Sun Jul 01 18:39:11 2012 -0700
     5.3 @@ -0,0 +1,5 @@
     5.4 +main()
     5.5 +{
     5.6 +    new i = 0;
     5.7 +    return ++i;
     5.8 +}
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/tests/prototype/preinc-ref.sp	Sun Jul 01 18:39:11 2012 -0700
     6.3 @@ -0,0 +1,10 @@
     6.4 +f(&a)
     6.5 +{
     6.6 +    return ++a;
     6.7 +}
     6.8 +
     6.9 +main()
    6.10 +{
    6.11 +    new i = 0;
    6.12 +    return f(i);
    6.13 +}