]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - testsuite/Makefile
ftepp_out can now output to a string buffer
[xonotic/gmqcc.git] / testsuite / Makefile
index 669ba57c14b14ed75b123e6a89ca9828f705be18..6eafd4c235a7a2de491c8a2d2699889091d78097 100644 (file)
@@ -14,7 +14,11 @@ TESTLIST = \
        equality   \
        fields1    \
        invalid-types \
-       ngraphs
+       ngraphs    \
+       invalid-assign \
+       field-parameters \
+       functions-as-parameters \
+       shadow-qcc shadow-gmqcc
 
 .PHONY: clean test
 
@@ -134,6 +138,7 @@ fields1:
        @diff $@/output $@/expected
 
 invalid-types-ok: obj invalid-types/assign.qc invalid-types/op.qc invalid-types/call1.qc invalid-types/call2.qc invalid-types/call3.qc
+       @echo "Testing: invalid-types"
        @if $(QCC) -std=qcc -o obj/invalid.dat invalid-types/op.qc     > obj/invalid.out 2>&1 ; then echo "Successfully compiled a file which was supposed to fail: op.qc"     ; false ; else true ; fi
        @if $(QCC) -std=qcc -o obj/invalid.dat invalid-types/call1.qc  > obj/invalid.out 2>&1 ; then echo "Successfully compiled a file which was supposed to fail: call1.qc"  ; false ; else true ; fi
        @if $(QCC) -std=qcc -o obj/invalid.dat invalid-types/call2.qc  > obj/invalid.out 2>&1 ; then echo "Successfully compiled a file which was supposed to fail: call2.qc"  ; false ; else true ; fi
@@ -148,6 +153,32 @@ ngraphs:
        @$(VM) $< > $@/output
        @diff $@/output $@/expected
 
+invalid-assign-ok: obj invalid-assign/main.qc
+       @echo "Testing: invalid-assign"
+       @if $(QCC) -std=qcc -o obj/invalid.dat invalid-assign/main.qc > obj/invalid.out 2>&1 ; then echo "Successfully compiled a file which was supposed to fail: invalid-assign/main.qc" ; false ; else true ; fi
+
+invalid-assign: invalid-assign-ok
+
+$(eval $(call maketest,field-parameters,qcc))
+field-parameters:
+       @$(VM) $< > $@/output
+       @diff $@/output $@/expected
+
+$(eval $(call maketest,functions-as-parameters,qcc))
+functions-as-parameters:
+       @$(VM) $< > $@/output
+       @diff $@/output $@/expected
+
+$(eval $(call maketest,shadow-qcc,qcc))
+shadow-qcc:
+       @$(VM) -vector '33 44 55' $< > $@/output
+       @diff $@/output $@/expected
+
+$(eval $(call maketest,shadow-gmqcc,gm))
+shadow-gmqcc:
+       @$(VM) -vector '33 44 55' $< > $@/output
+       @diff $@/output $@/expected
+
 #######################################################################
 obj:
        mkdir obj