mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Add a test case for the alias chain mangling.
I think I need to rework the tests to better handle compile-only tests.
This commit is contained in:
parent
31b07bcbbf
commit
026a992179
2 changed files with 35 additions and 1 deletions
|
@ -18,7 +18,13 @@ QFCC_TEST_LIBS=@QFCC_TEST_LIBS@
|
|||
QFCC_TEST_DEPS=@QFCC_TEST_DEPS@
|
||||
QFCC_TEST_INCS=@QFCC_TEST_INCS@
|
||||
|
||||
test_progs_dat=deadbool.dat infloop.dat modulo.dat structptr.dat while.dat
|
||||
test_progs_dat=\
|
||||
chewed-alias.dat \
|
||||
deadbool.dat \
|
||||
infloop.dat \
|
||||
modulo.dat \
|
||||
structptr.dat \
|
||||
while.dat
|
||||
|
||||
TESTS=$(test_progs_dat:.dat=.run)
|
||||
|
||||
|
@ -28,6 +34,13 @@ test_harness_SOURCES= test-bi.c test-harness.c
|
|||
test_harness_LDADD= $(QFCC_TEST_LIBS)
|
||||
test_harness_DEPENDENCIES= $(QFCC_TEST_DEPS)
|
||||
|
||||
chewed_alias_dat_SOURCES=chewed-alias.r
|
||||
chewed_alias_obj=$(chewed_alias_dat_SOURCES:.r=.qfo)
|
||||
chewed-alias.dat: $(chewed_alias_obj) $(QFCC_DEP)
|
||||
$(QFCC) $(QCFLAGS) -o $@ $(chewed_alias_obj)
|
||||
chewed-alias.run: Makefile build-run
|
||||
$(srcdir)/build-run $@
|
||||
|
||||
deadbool_dat_SOURCES=deadbool.r
|
||||
deadbool_obj=$(deadbool_dat_SOURCES:.r=.qfo)
|
||||
deadbool.dat: $(deadbool_obj) $(QFCC_DEP)
|
||||
|
|
21
tools/qfcc/test/chewed-alias.r
Normal file
21
tools/qfcc/test/chewed-alias.r
Normal file
|
@ -0,0 +1,21 @@
|
|||
@class Array,Object;
|
||||
@static entity waypoint_thinker;
|
||||
@static Array *waypoint_queue;
|
||||
void foo (void)
|
||||
{
|
||||
if ([waypoint_queue count]
|
||||
&& (waypoint_thinker.@this = [waypoint_queue lastObject])) {
|
||||
waypoint_thinker = nil; // just to deconfuse the dot graphs
|
||||
}
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
return 0; // test succeeds if compile succeeds
|
||||
}
|
||||
id obj_msgSend (id receiver, SEL op, ...) = #0;
|
||||
void __obj_exec_class (struct obj_module *msg) = #0;
|
||||
@implementation Object
|
||||
@end
|
||||
@implementation Array
|
||||
@end
|
Loading…
Reference in a new issue