From: Snafu Date: Mon, 17 May 2010 18:22:24 +0000 (+0200) Subject: Added < and = test with globals only X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=testub10.git;a=commitdiff_plain;h=d37ec1b24167bcaf381f39c907f4bb95fffc2088 Added < and = test with globals only --- diff --git a/codea/snafu_06.0 b/codea/snafu_06.0 index fc32cff..a4acd84 100644 --- a/codea/snafu_06.0 +++ b/codea/snafu_06.0 @@ -1,3 +1,5 @@ +struct a b end; + method test64() return this - -2139062144; end; @@ -9,3 +11,11 @@ end; method num2() return 15 - (4 - 2 - 6 - 7); end; + +method globcmp() + return this.a < this.b; +end; + +method globcmp2() + return this.a = this.b; +end; diff --git a/codea/snafu_06.call b/codea/snafu_06.call index e792f96..ecb435a 100644 --- a/codea/snafu_06.call +++ b/codea/snafu_06.call @@ -1,5 +1,21 @@ long test64(long); +long num(long); +long num2(long); +long globcmp(long*); +long globcmp2(long*); + + +long foo[] = {1337, 42}; +long bar[] = {23, 23}; +long foobar[] = {23, 42}; RET((test64(0x1000000000) == (long) 0x1000000000 - (int) 0x80808080) && (num(0) == -4) - && (num2(0) == 26)); + && (num2(0) == 26) + && (globcmp(foo) == 0) + && (globcmp(bar) == 0) + && (globcmp(foobar) == 1) + && (globcmp2(foo) == 0) + && (globcmp2(bar) == 1) + && (globcmp2(foobar) == 0) + ); diff --git a/codea/snafu_06.instr b/codea/snafu_06.instr index 7f8f011..81b5c5d 100644 --- a/codea/snafu_06.instr +++ b/codea/snafu_06.instr @@ -1 +1 @@ -7 +37