mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-21 11:11:37 +00:00
Yay, even more tests :P
This commit is contained in:
parent
6a49861b49
commit
a9eb793a5e
4 changed files with 72 additions and 2 deletions
7
tools/qfcc/test/float-int.r
Normal file
7
tools/qfcc/test/float-int.r
Normal 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
40
tools/qfcc/test/ivar.r
Normal 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
|
|
@ -6,7 +6,21 @@ typedef struct foo_s {
|
||||||
plitem_t i;
|
plitem_t i;
|
||||||
} foo_t;
|
} 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
9
tools/qfcc/test/value.r
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
float VAL1 = 4;
|
||||||
|
float VAL2 = 6;
|
||||||
|
|
||||||
|
void send (float to, ...) = #0;
|
||||||
|
|
||||||
|
void do_something ()
|
||||||
|
{
|
||||||
|
send (VAL1, VAL2);
|
||||||
|
}
|
Loading…
Reference in a new issue