Yay, even more tests :P

This commit is contained in:
Bill Currie 2011-03-22 15:00:46 +09:00
parent 6a49861b49
commit a9eb793a5e
4 changed files with 72 additions and 2 deletions

View File

@ -0,0 +1,7 @@
float (integer i) foo = #0;
integer (integer a) bar = #0;
integer func (integer size)
{
return bar (foo (size) * 8);
}

40
tools/qfcc/test/ivar.r Normal file
View File

@ -0,0 +1,40 @@
@interface foo
{
Class isa;
unsigned retainCount;
}
+(id) alloc;
-(id) init;
@end
@interface baz: foo
{
integer xpos, ypos;
integer xlen, ylen;
integer xabs, yabs;
baz *parent;
integer flags;
}
@end
@class baz;
@class foo;
@interface bar: baz
{
integer blah;
}
-(id) init;
@end
@implementation bar
{
integer blah;
}
-(id) init
{
blah = 0xdeadbeaf;
return self;
}
@end

View File

@ -6,7 +6,21 @@ typedef struct foo_s {
plitem_t i;
} foo_t;
void bar (foo_t *foo, plitem_t item)
foo_t snafu (foo_t x) = #0;
foo_t zap (void) = #0;
foo_t aa[5];
foo_t x;
foo_t bar (foo_t *foo, plitem_t item)
{
foo.i = item;
// x = aa[foo.x];
// aa[foo.x + 1] = aa[foo.x - 1];
// aa[foo.x] = x;
// snafu (aa[foo.x]);
// aa[foo.x] = snafu (aa[foo.x]);
aa[foo.x] = zap ();
// foo.i = item;
// return aa[foo.x];
return zap ();
}

9
tools/qfcc/test/value.r Normal file
View File

@ -0,0 +1,9 @@
float VAL1 = 4;
float VAL2 = 6;
void send (float to, ...) = #0;
void do_something ()
{
send (VAL1, VAL2);
}