mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 16:30:43 +00:00
Add a test for calling class methods.
This commit is contained in:
parent
02f78e46f8
commit
a27ea057c4
1 changed files with 30 additions and 0 deletions
30
tools/qfcc/test/class-method.r
Normal file
30
tools/qfcc/test/class-method.r
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
@interface nack
|
||||||
|
+arg;
|
||||||
|
-bla;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface foo : nack
|
||||||
|
+bar;
|
||||||
|
+baz;
|
||||||
|
-snafu;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation foo
|
||||||
|
|
||||||
|
+bar
|
||||||
|
{
|
||||||
|
[self bla];
|
||||||
|
return [self baz];
|
||||||
|
}
|
||||||
|
|
||||||
|
+baz
|
||||||
|
{
|
||||||
|
return [self snafu];
|
||||||
|
}
|
||||||
|
|
||||||
|
-snafu
|
||||||
|
{
|
||||||
|
[self baz];
|
||||||
|
return [self snafu];
|
||||||
|
}
|
||||||
|
@end
|
Loading…
Add table
Add a link
Reference in a new issue