diff --git a/tools/qfcc/test/overload.r b/tools/qfcc/test/overload.r new file mode 100644 index 000000000..f6cf04aa0 --- /dev/null +++ b/tools/qfcc/test/overload.r @@ -0,0 +1,31 @@ +//integer foo; +//typedef integer foo; +//integer (void) foo = #0; +//integer (bag); +//.integer (sack); +//.integer (float sack)x; +//integer *bar, baz; +//integer snafu(void) +//{ +//} +//integer [8]blah; + +@overload void func (integer a, integer b, integer c); +@overload void func (integer a, integer b); +@overload void func (integer a, ...); +//@overload void func (integer a, integer b, ...); +@overload void func (string y); +//@overload void func (...); +void func (integer x) +{ +// func (""); +} +void func (string y) +{ +// func (0.0); +// func (0, 0.0); +// func (0, 0, 0.0); + func (0.0, ""); +// func (0, 0, 0, 0, 0.0); +} + diff --git a/tools/qfcc/test/pointer-param.r b/tools/qfcc/test/pointer-param.r new file mode 100644 index 000000000..9de6da0bc --- /dev/null +++ b/tools/qfcc/test/pointer-param.r @@ -0,0 +1,17 @@ +@interface foo +-(integer)bar:(integer [])baz; +@end + +@implementation foo +-(integer)bar:(integer [])blah +{ + return blah[1]; +} +@end + +integer (integer x) bletch; + +integer (integer y) bletch = +{ + return y; +} diff --git a/tools/qfcc/test/struct-return.r b/tools/qfcc/test/struct-return.r new file mode 100644 index 000000000..28f797d8a --- /dev/null +++ b/tools/qfcc/test/struct-return.r @@ -0,0 +1,48 @@ +void (obj_module_t [] msg) __obj_exec_class = #0; +id (id receiver, SEL op, ...) obj_msgSend = #0; + +struct val_s { + integer w,x,y,z; +}; +typedef struct val_s val_t; + +struct foo_s { + integer a; + val_t b; +}; +typedef struct foo_s foo_t; + +@interface Foo +{ + val_t v; +} +- (val_t) v; +@end +/* +@implementation Foo +- (val_t) v +{ + return v; +} +@end + +val_t () foo = +{ +// local val_t v; + local foo_t f; + local foo_t []ff = &f; +// v.x = v.y = v.z = v.w = 0; +// f.b = v; +// v = f.b; +// return v; +// ff.b = v; +// v = ff.b; + return ff.b; +} +*/ +void (Foo f) bar = +{ +// local val_t v = foo (); + local val_t u = [f v]; +} +