- Timestamp:
- Apr 23, 2019, 10:26:14 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- ffe2fad
- Parents:
- deca0f5 (diff), 8f194ee (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- tests
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/completeTypeError.txt
rdeca0f5 r8c3a0336 1 completeTypeError.cfa:33:1 error: No reasonable alternatives for expression Applying untyped: 2 Name: *? 3 ...to: 4 Name: v 1 completeTypeError.cfa:34:1 error: Cannot choose between 2 alternatives for expression 2 Generated Cast of: 3 Applying untyped: 4 Name: *? 5 ...to: 6 Name: x 5 7 6 completeTypeError.cfa:34:1 error: No reasonable alternatives for expression Applying untyped: 7 Name: *? 8 ...to: 9 Name: y 8 ... to: nothing Alternatives are: 9 Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of: 10 Application of 11 Variable Expression: *?: forall 12 DT: object type 13 function 14 ... with parameters 15 intrinsic pointer to instance of type DT (not function type) 16 ... returning 17 _retval__operator_deref: reference to instance of type DT (not function type) 18 ... with attributes: 19 Attribute with name: unused 20 21 22 ... to arguments 23 Variable Expression: x: pointer to instance of struct A with body 0 24 25 ... to: nothing 26 (types: 27 void 28 ) 29 Environment:( _80_4_DT ) -> instance of struct A with body 0 (no widening) 30 31 32 Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of: 33 Application of 34 Variable Expression: *?: forall 35 DT: object type 36 function 37 ... with parameters 38 intrinsic pointer to instance of type DT (not function type) 39 ... returning 40 _retval__operator_deref: reference to instance of type DT (not function type) 41 ... with attributes: 42 Attribute with name: unused 43 44 45 ... to arguments 46 Variable Expression: x: pointer to instance of struct B with body 1 47 48 ... to: nothing 49 (types: 50 void 51 ) 52 Environment:( _80_4_DT ) -> instance of struct B with body 1 (no widening) 53 54 10 55 11 56 completeTypeError.cfa:35:1 error: No reasonable alternatives for expression Applying untyped: … … 24 69 Name: v 25 70 26 completeTypeError.cfa:5 8:1 error: No reasonable alternatives for expression Applying untyped:71 completeTypeError.cfa:59:1 error: No reasonable alternatives for expression Applying untyped: 27 72 Name: baz 28 73 ...to: 29 74 Name: y 30 75 31 completeTypeError.cfa: 59:1 error: No reasonable alternatives for expression Applying untyped:76 completeTypeError.cfa:60:1 error: No reasonable alternatives for expression Applying untyped: 32 77 Name: quux 33 78 ...to: 34 79 Name: y 35 80 36 completeTypeError.cfa:60:1 error: No reasonable alternatives for expression Applying untyped: 37 Name: *? 38 ...to: 39 Name: y 40 41 completeTypeError.cfa:72:1 error: No resolvable alternatives for expression Applying untyped: 81 completeTypeError.cfa:72:1 error: No alternatives with satisfiable assertions for Applying untyped: 42 82 Name: baz 43 83 ...to: 44 84 Name: z 45 85 46 Alternatives with failing assertions are:86 Unsatisfiable alternative: 47 87 Cost ( 0, 1, 0, 0, 1, -5, 0 ): Application of 48 Variable Expression: baz: forall49 T: sized object type50 ... with assertions51 ?=?: pointer to function52 ... with parameters53 reference to instance of type T (not function type)54 instance of type T (not function type)55 ... returning56 _retval__operator_assign: instance of type T (not function type)57 ... with attributes:58 Attribute with name: unused88 Variable Expression: baz: forall 89 T: sized object type 90 ... with assertions 91 ?=?: pointer to function 92 ... with parameters 93 reference to instance of type T (not function type) 94 instance of type T (not function type) 95 ... returning 96 _retval__operator_assign: instance of type T (not function type) 97 ... with attributes: 98 Attribute with name: unused 59 99 60 100 61 ?{}: pointer to function 101 ?{}: pointer to function 102 ... with parameters 103 reference to instance of type T (not function type) 104 ... returning nothing 105 106 ?{}: pointer to function 107 ... with parameters 108 reference to instance of type T (not function type) 109 instance of type T (not function type) 110 ... returning nothing 111 112 ^?{}: pointer to function 113 ... with parameters 114 reference to instance of type T (not function type) 115 ... returning nothing 116 117 118 function 62 119 ... with parameters 63 referenceto instance of type T (not function type)120 pointer to instance of type T (not function type) 64 121 ... returning nothing 65 122 66 ?{}: pointer to function 67 ... with parameters 68 reference to instance of type T (not function type) 69 instance of type T (not function type) 70 ... returning nothing 123 ... to arguments 124 Variable Expression: z: pointer to instance of type T (not function type) 71 125 72 ^?{}: pointer to function 73 ... with parameters 74 reference to instance of type T (not function type) 75 ... returning nothing 126 (types: 127 void 128 ) 129 Environment:( _99_0_T ) -> instance of type T (not function type) (no widening) 130 131 Could not satisfy assertion: 132 ?=?: pointer to function 133 ... with parameters 134 reference to instance of type _99_0_T (not function type) 135 instance of type _99_0_T (not function type) 136 ... returning 137 _retval__operator_assign: instance of type _99_0_T (not function type) 138 ... with attributes: 139 Attribute with name: unused 76 140 77 141 78 function79 ... with parameters80 pointer to instance of type T (not function type)81 ... returning nothing82 83 ... to arguments84 Variable Expression: z: pointer to instance of type T (not function type)85 86 (types:87 void88 )89 Environment:( _99_0_T ) -> instance of type T (not function type) (no widening)90 91 92 -
tests/.expect/loopctrl.txt
rdeca0f5 r8c3a0336 19 19 10 8 6 4 2 20 20 21 1 2 3 4 5 6 7 8 9 10 22 10 9 8 7 6 5 4 3 2 1 0 21 23 2 4 6 8 10 22 24 2.1 3.8 5.5 7.2 8.9 … … 42 44 (10 10)(9 9)(8 8)(7 7)(6 6)(5 5)(4 4)(3 3)(2 2)(1 1)(0 0) 43 45 (10 10)(9 9)(8 8)(7 7)(6 6)(5 5)(4 4)(3 3)(2 2)(1 1)(0 0) 46 47 0 -5 1 -4 2 -3 3 -2 4 -1 5 0 6 1 7 2 8 3 9 4 48 0 -5 1 -6 2 -7 3 -8 4 -9 5 -10 6 -11 7 -12 8 -13 9 -14 49 0 -5 1 -3 2 -1 3 1 4 3 5 5 6 7 7 9 8 11 9 13 50 0 -5 1 -7 2 -9 3 -11 4 -13 5 -15 6 -17 7 -19 8 -21 9 -23 51 52 0 -5 1 -4 2 -3 3 -2 4 -1 5 0 6 1 7 2 8 3 9 4 53 0 -5 1 -6 2 -7 3 -8 4 -9 5 -10 6 -11 7 -12 8 -13 9 -14 54 0 -5 1 -3 2 -1 3 1 4 3 5 5 6 7 7 9 8 11 9 13 55 0 -5 1 -7 2 -9 3 -11 4 -13 5 -15 6 -17 7 -19 8 -21 9 -23 56 57 0 -5 1.5 1 -7 2.5 2 -9 3.5 3 -11 4.5 4 -13 5.5 5 -15 6.5 6 -17 7.5 7 -19 8.5 8 -21 9.5 9 -23 10.5 58 0 -5 1.5 1 -7 2.5 2 -9 3.5 3 -11 4.5 4 -13 5.5 5 -15 6.5 6 -17 7.5 7 -19 8.5 8 -21 9.5 9 -23 10.5 59 0 -5 1.5 1 -7 2.5 2 -9 3.5 3 -11 4.5 4 -13 5.5 5 -15 6.5 6 -17 7.5 7 -19 8.5 8 -21 9.5 9 -23 10.5 -
tests/Makefile.am
rdeca0f5 r8c3a0336 44 44 CC = @CFACC@ 45 45 46 PRETTY_PATH= cd ${srcdir} &&46 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && 47 47 48 48 .PHONY: list .validate … … 85 85 #---------------------------------------------------------------------------------------------------------------- 86 86 87 # Use for all tests, make sure the path are correct and all flags are added 88 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g')) 89 90 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail 91 CFATEST_STDOUT=$(CFACOMPILETEST) -o $(abspath ${@}) 92 93 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr 94 CFATEST_STDERR=$(CFACOMPILETEST) 2> $(abspath ${@}) 95 96 #---------------------------------------------------------------------------------------------------------------- 97 87 98 # implicit rule so not all test require a rule 88 99 % : %.cfa $(CFACC) 89 $( PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})100 $(CFATEST_STDOUT) 90 101 91 102 % : %.cpp 92 103 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 93 104 94 declarationSpecifier: declarationSpecifier.cfa $(CFACC) 95 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 105 #------------------------------------------------------------------------------ 106 # TARGET WITH STANDARD RULE BUT CUSTOM FLAGS 107 #------------------------------------------------------------------------------ 108 # Expected failures 109 declarationSpecifier_FLAGS= -CFA -XCFA -p 110 gccExtensions_FLAGS= -CFA -XCFA -p 111 extension_FLAGS= -CFA -XCFA -p 112 attributes_FLAGS= -CFA -XCFA -p 113 functions_FLAGS= -CFA -XCFA -p 114 KRfunctions_FLAGS= -CFA -XCFA -p 115 gmp_FLAGS= -lgmp 96 116 97 gccExtensions : gccExtensions.cfa $(CFACC) 98 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 117 #------------------------------------------------------------------------------ 118 # Expected failures 119 completeTypeError_FLAGS= -DERR1 99 120 100 extension : extension.cfa $(CFACC) 101 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 121 #------------------------------------------------------------------------------ 122 # CUSTOM TARGET 123 #------------------------------------------------------------------------------ 124 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 125 $(CFATEST_STDOUT) -DERR1 102 126 103 a ttributes : attributes.cfa $(CFACC)104 $( PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})127 alloc-ERROR: alloc.cfa $(CFACC) 128 $(CFATEST_STDOUT) -DERR1 105 129 106 functions: functions.cfa $(CFACC)107 $( PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})130 nested-types-ERR1: nested-types.cfa $(CFACC) 131 $(CFATEST_STDOUT) -DERR1 108 132 109 KRfunctions : KRfunctions.cfa $(CFACC)110 $( PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})133 nested-types-ERR2: nested-types.cfa $(CFACC) 134 $(CFATEST_STDOUT) -DERR2 111 135 112 sched-ext-parse : sched-ext-parse.c$(CFACC)113 $( PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})136 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC) 137 $(CFATEST_STDOUT) -DERR1 114 138 115 gmp : gmp.cfa $(CFACC) 116 $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 139 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC) 140 $(CFATEST_STDOUT) -DERR2 141 142 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC) 143 $(CFATEST_STDOUT) -DERR1 144 145 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC) 146 $(CFATEST_STDOUT) -DERR1 117 147 118 148 #builtins 119 149 builtins/sync: builtins/sync.cfa $(CFACC) 120 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 121 122 #------------------------------------------------------------------------------ 123 124 #To make errors path independent we need to cd into the correct directories 125 completeTypeError : completeTypeError.cfa $(CFACC) 126 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 127 128 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 129 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 130 131 alloc-ERROR: alloc.cfa $(CFACC) 132 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 133 134 fallthrough-ERROR: fallthrough.cfa $(CFACC) 135 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 136 137 nested-types-ERR1: nested-types.cfa $(CFACC) 138 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 139 140 nested-types-ERR2: nested-types.cfa $(CFACC) 141 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 142 143 # Constructor/destructor tests 144 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC) 145 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 146 147 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC) 148 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 149 150 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC) 151 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 152 153 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC) 154 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 150 $(CFATEST_STDERR) -fsyntax-only 155 151 156 152 # Warnings 157 153 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC) 158 $( PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only154 $(CFATEST_STDERR) -fsyntax-only -
tests/Makefile.in
rdeca0f5 r8c3a0336 386 386 -quiet @CFA_FLAGS@ -DIN_DIR="${abs_srcdir}/.in/" \ 387 387 ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} 388 PRETTY_PATH = cd ${srcdir} &&388 PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && 389 389 avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa 390 390 # automake doesn't know we still need C/CPP rules so pretend like we have a C program 391 391 _dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp 392 393 #---------------------------------------------------------------------------------------------------------------- 394 395 # Use for all tests, make sure the path are correct and all flags are added 396 CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g')) 397 398 # Use for tests that either generate an executable, print directyl to stdout or the make command is expected to fail 399 CFATEST_STDOUT = $(CFACOMPILETEST) -o $(abspath ${@}) 400 401 # Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr 402 CFATEST_STDERR = $(CFACOMPILETEST) 2> $(abspath ${@}) 403 404 #------------------------------------------------------------------------------ 405 # TARGET WITH STANDARD RULE BUT CUSTOM FLAGS 406 #------------------------------------------------------------------------------ 407 # Expected failures 408 declarationSpecifier_FLAGS = -CFA -XCFA -p 409 gccExtensions_FLAGS = -CFA -XCFA -p 410 extension_FLAGS = -CFA -XCFA -p 411 attributes_FLAGS = -CFA -XCFA -p 412 functions_FLAGS = -CFA -XCFA -p 413 KRfunctions_FLAGS = -CFA -XCFA -p 414 gmp_FLAGS = -lgmp 415 416 #------------------------------------------------------------------------------ 417 # Expected failures 418 completeTypeError_FLAGS = -DERR1 392 419 all: all-am 393 420 … … 772 799 # implicit rule so not all test require a rule 773 800 % : %.cfa $(CFACC) 774 $( PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})801 $(CFATEST_STDOUT) 775 802 776 803 % : %.cpp 777 804 $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 778 805 779 declarationSpecifier: declarationSpecifier.cfa $(CFACC) 780 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 781 782 gccExtensions : gccExtensions.cfa $(CFACC) 783 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 784 785 extension : extension.cfa $(CFACC) 786 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 787 788 attributes : attributes.cfa $(CFACC) 789 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 790 791 functions: functions.cfa $(CFACC) 792 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 793 794 KRfunctions : KRfunctions.cfa $(CFACC) 795 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 796 797 sched-ext-parse : sched-ext-parse.c $(CFACC) 798 $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 799 800 gmp : gmp.cfa $(CFACC) 801 $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 806 #------------------------------------------------------------------------------ 807 # CUSTOM TARGET 808 #------------------------------------------------------------------------------ 809 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 810 $(CFATEST_STDOUT) -DERR1 811 812 alloc-ERROR: alloc.cfa $(CFACC) 813 $(CFATEST_STDOUT) -DERR1 814 815 nested-types-ERR1: nested-types.cfa $(CFACC) 816 $(CFATEST_STDOUT) -DERR1 817 818 nested-types-ERR2: nested-types.cfa $(CFACC) 819 $(CFATEST_STDOUT) -DERR2 820 821 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC) 822 $(CFATEST_STDOUT) -DERR1 823 824 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC) 825 $(CFATEST_STDOUT) -DERR2 826 827 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC) 828 $(CFATEST_STDOUT) -DERR1 829 830 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC) 831 $(CFATEST_STDOUT) -DERR1 802 832 803 833 #builtins 804 834 builtins/sync: builtins/sync.cfa $(CFACC) 805 $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only 806 807 #------------------------------------------------------------------------------ 808 809 #To make errors path independent we need to cd into the correct directories 810 completeTypeError : completeTypeError.cfa $(CFACC) 811 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 812 813 typedefRedef-ERR1: typedefRedef.cfa $(CFACC) 814 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 815 816 alloc-ERROR: alloc.cfa $(CFACC) 817 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 818 819 fallthrough-ERROR: fallthrough.cfa $(CFACC) 820 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 821 822 nested-types-ERR1: nested-types.cfa $(CFACC) 823 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 824 825 nested-types-ERR2: nested-types.cfa $(CFACC) 826 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 827 828 # Constructor/destructor tests 829 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC) 830 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 831 832 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC) 833 $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 834 835 raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC) 836 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 837 838 raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC) 839 $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) 835 $(CFATEST_STDERR) -fsyntax-only 840 836 841 837 # Warnings 842 838 warnings/self-assignment: warnings/self-assignment.cfa $(CFACC) 843 $( PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only839 $(CFATEST_STDERR) -fsyntax-only 844 840 845 841 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
tests/completeTypeError.cfa
rdeca0f5 r8c3a0336 5 5 forall(dtype T | sized(T)) void quux(T *); 6 6 7 struct A; 8 struct B {}; 7 struct A; // incomplete 8 struct B {}; // complete 9 9 10 10 int main() { 11 int * i;12 void * v;11 int * i; 12 void * v; 13 13 14 14 A * x; … … 19 19 // okay 20 20 *i; 21 * x; // picks B21 *y; 22 22 *z; 23 23 foo(i); … … 32 32 // bad 33 33 *v; 34 * y;34 *x; // ambiguous 35 35 foo(v); 36 36 baz(v); … … 52 52 void qux(T * y) { 53 53 // okay 54 *y; 54 55 bar(y); 55 56 qux(y); … … 58 59 baz(y); 59 60 quux(y); 60 *y;61 61 } 62 62 -
tests/coroutine/devicedriver.cfa
rdeca0f5 r8c3a0336 10 10 // Created On : Sat Mar 16 15:30:34 2019 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 19 15:59:06201913 // Update Count : 8712 // Last Modified On : Sat Apr 20 09:07:19 2019 13 // Update Count : 90 14 14 // 15 15 … … 67 67 char msg[65], byte; 68 68 Driver driver = { msg }; 69 70 sin | nlOn; // read newline (all) characters 69 71 eof: for () { // read until end of file 70 72 sin | byte; // read one character -
tests/function-operator.cfa
rdeca0f5 r8c3a0336 10 10 // Created On : Fri Aug 25 15:21:11 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Dec 4 21:37:09 201813 // Update Count : 912 // Last Modified On : Thu Apr 11 18:27:45 2019 13 // Update Count : 10 14 14 // 15 15 … … 62 62 63 63 // test ?()(T, ...) -- ?() with function call-by-reference 64 forall(otype Generator, otype GenRet | { GenRet ?()(Generator &); }, dtype Iter, otype T | Iterator(Iter, T) | Assignable(T, GenRet))64 forall(otype Generator, otype GenRet | { GenRet ?()(Generator &); }, dtype Iter, otype T | Iterator(Iter, T) | Assignable(T, GenRet)) 65 65 void generate(Iter first, Iter last, Generator & gen) { 66 66 int i = 0; -
tests/io2.cfa
rdeca0f5 r8c3a0336 10 10 // Created On : Wed Mar 2 16:56:02 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Dec 21 08:20:14 201813 // Update Count : 11 212 // Last Modified On : Thu Apr 18 08:03:30 2019 13 // Update Count : 113 14 14 // 15 15 … … 97 97 sout | 1 | sepOff | 2 | 3; // locally turn off implicit separator 98 98 sout | sepOn | sepOn | 1 | 2 | 3 | sepOn | sepOff | sepOn | '\n' | nonl; // no separator at start/end of line 99 sout | 1 | 2 | 3 | "\n\n" | sepOn | nonl; 99 sout | 1 | 2 | 3 | "\n\n" | sepOn | nonl; // no separator at start of next line 100 100 sout | 1 | 2 | 3; 101 101 sout | nl; -
tests/loopctrl.cfa
rdeca0f5 r8c3a0336 10 10 // Created On : Wed Aug 8 18:32:59 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 21 08:54:47201913 // Update Count : 8612 // Last Modified On : Sat Apr 13 11:03:09 2019 13 // Update Count : 104 14 14 // 15 15 … … 56 56 for ( ui; 10u -~= 2u ~ 2u ) { sout | ui; } sout | nl | nl; 57 57 58 // @ means do nothing 59 for ( i; 1 ~ @ ) { 60 if ( i > 10 ) break; 61 sout | i; 62 } sout | nl; 63 for ( i; 10 -~ @ ) { 64 if ( i < 0 ) break; 65 sout | i; 66 } sout | nl; 58 67 for ( i; 2 ~ @ ~ 2 ) { 59 68 if ( i > 10 ) break; … … 94 103 for ( s; (S){10,10} -~ (S){0} ~ (S){1} ) { sout | s; } sout | nl; 95 104 for ( s; (S){10,10} -~= (S){0} ) { sout | s; } sout | nl; 96 for ( s; (S){10,10} -~= (S){0} ~ (S){1} ) { sout | s; } sout | nl; 105 for ( s; (S){10,10} -~= (S){0} ~ (S){1} ) { sout | s; } sout | nl | nl; 106 107 for ( i; 10 : j; -5 ~ @ ) { sout | i | j; } sout | nl; 108 for ( i; 10 : j; -5 -~ @ ) { sout | i | j; } sout | nl; 109 for ( i; 10 : j; -5 ~ @ ~ 2 ) { sout | i | j; } sout | nl; 110 for ( i; 10 : j; -5 -~ @ ~ 2 ) { sout | i | j; } sout | nl | nl; 111 112 for ( j; -5 ~ @ : i; 10 ) { sout | i | j; } sout | nl; 113 for ( j; -5 -~ @ : i; 10 ) { sout | i | j; } sout | nl; 114 for ( j; -5 ~ @ ~ 2 : i; 10 ) { sout | i | j; } sout | nl; 115 for ( j; -5 -~ @ ~ 2 : i; 10 ) { sout | i | j; } sout | nl | nl; 116 117 for ( j; -5 -~ @ ~ 2 : i; 10 : k; 1.5 ~ @ ) { sout | i | j | k; } sout | nl; 118 for ( j; -5 -~ @ ~ 2 : k; 1.5 ~ @ : i; 10 ) { sout | i | j | k; } sout | nl; 119 for ( k; 1.5 ~ @ : j; -5 -~ @ ~ 2 : i; 10 ) { sout | i | j | k; } sout | nl; 97 120 } 98 121
Note: See TracChangeset
for help on using the changeset viewer.