more tests

This commit is contained in:
Bill Currie 2005-06-14 11:29:42 +00:00
parent 76305e7e6b
commit 0c974c0530
3 changed files with 96 additions and 0 deletions

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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];
}