Add preinc-ref test.
authorDavid Anderson <dvander@alliedmods.net>
Sat Dec 22 16:25:16 2012 -0800 (2012-12-22)
changeset 22866a0028d86c5
parent 227 2443792ea5a3
child 229 ce072f38628c
Add preinc-ref test.
tests/basic/preinc-ref.out
tests/basic/preinc-ref.sp
tests/prototype/preinc-ref.sp
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/basic/preinc-ref.out	Sat Dec 22 16:25:16 2012 -0800
     1.3 @@ -0,0 +1,1 @@
     1.4 +11
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tests/basic/preinc-ref.sp	Sat Dec 22 16:25:16 2012 -0800
     2.3 @@ -0,0 +1,13 @@
     2.4 +native PrintNum(num);
     2.5 +
     2.6 +f(&a)
     2.7 +{
     2.8 +    return ++a;
     2.9 +}
    2.10 +
    2.11 +public main()
    2.12 +{
    2.13 +    new i = 0;
    2.14 +    PrintNum(f(i));
    2.15 +    PrintNum(i);
    2.16 +}
     3.1 --- a/tests/prototype/preinc-ref.sp	Sat Dec 22 16:24:04 2012 -0800
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,10 +0,0 @@
     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 -}