mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[qfcc] Add failing test for method parameters
This commit is contained in:
parent
ba9c43d2d3
commit
a2cebe3cac
2 changed files with 27 additions and 0 deletions
|
@ -43,6 +43,7 @@ test_progs_dat=\
|
|||
func-static.dat \
|
||||
infloop.dat \
|
||||
ivar-struct-return.dat \
|
||||
methodparams.dat \
|
||||
modulo.dat \
|
||||
paramret.dat \
|
||||
quaternion.dat \
|
||||
|
@ -258,6 +259,15 @@ ivar-struct-return.run: Makefile build-run
|
|||
include ./$(DEPDIR)/ivar-struct-return.Qo # am--include-marker
|
||||
r_depfiles_remade += ./$(DEPDIR)/ivar-struct-return.Qo
|
||||
|
||||
methodparams_dat_SOURCES=methodparams.r
|
||||
methodparams_obj=$(methodparams_dat_SOURCES:.r=.qfo)
|
||||
methodparams.dat$(EXEEXT): $(methodparams_obj) $(QFCC_DEP)
|
||||
$(QFCC) $(QCFLAGS) -o $@ $(methodparams_obj)
|
||||
methodparams.run: Makefile build-run
|
||||
@TEST_HARNESS_OPTS=--float $(srcdir)/build-run $@
|
||||
include ./$(DEPDIR)/methodparams.Qo # am--include-marker
|
||||
r_depfiles_remade += ./$(DEPDIR)/methodparams.Qo
|
||||
|
||||
modulo_dat_SOURCES=modulo.r
|
||||
modulo_obj=$(modulo_dat_SOURCES:.r=.qfo)
|
||||
modulo.dat$(EXEEXT): $(modulo_obj) $(QFCC_DEP)
|
||||
|
|
17
tools/qfcc/test/methodparams.r
Normal file
17
tools/qfcc/test/methodparams.r
Normal file
|
@ -0,0 +1,17 @@
|
|||
typedef struct { int x, y; } Point;
|
||||
@interface TextContext
|
||||
- (void) mvvprintf: (Point) pos, string mft, @va_list args;
|
||||
@end
|
||||
@interface View
|
||||
{
|
||||
TextContext *textContext;
|
||||
}
|
||||
- (void) mvprintf: (Point) pos, string mft, ...;
|
||||
@end
|
||||
|
||||
@implementation View
|
||||
- (void) mvprintf: (Point) pos, string fmt, ...
|
||||
{
|
||||
[textContext mvvprintf: pos, fmt, @args];
|
||||
}
|
||||
@end
|
Loading…
Reference in a new issue