Changeset 8c3a0336 for tests


Ignore:
Timestamp:
Apr 23, 2019, 10:26:14 AM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
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.
Message:

Merge branch 'master' into ctxswitch

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
     1completeTypeError.cfa:34:1 error: Cannot choose between 2 alternatives for expression
     2Generated Cast of:
     3  Applying untyped:
     4    Name: *?
     5  ...to:
     6    Name: x
    57
    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:
     9Cost ( 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
     32Cost ( 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
    1055
    1156completeTypeError.cfa:35:1 error: No reasonable alternatives for expression Applying untyped:
     
    2469  Name: v
    2570
    26 completeTypeError.cfa:58:1 error: No reasonable alternatives for expression Applying untyped:
     71completeTypeError.cfa:59:1 error: No reasonable alternatives for expression Applying untyped:
    2772  Name: baz
    2873...to:
    2974  Name: y
    3075
    31 completeTypeError.cfa:59:1 error: No reasonable alternatives for expression Applying untyped:
     76completeTypeError.cfa:60:1 error: No reasonable alternatives for expression Applying untyped:
    3277  Name: quux
    3378...to:
    3479  Name: y
    3580
    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:
     81completeTypeError.cfa:72:1 error: No alternatives with satisfiable assertions for Applying untyped:
    4282  Name: baz
    4383...to:
    4484  Name: z
    4585
    46 Alternatives with failing assertions are:
     86   Unsatisfiable alternative:
    4787Cost ( 0, 1, 0, 0, 1, -5, 0 ): Application of
    48      Variable Expression: baz: forall
    49        T: sized object type
    50        ... with assertions
    51          ?=?: pointer to function
    52          ... with parameters
    53            reference to instance of type T (not function type)
    54            instance of type T (not function type)
    55          ... returning
    56            _retval__operator_assign: instance of type T (not function type)
    57            ... with attributes:
    58              Attribute with name: unused
     88         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
    5999
    60100
    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
    62119         ... with parameters
    63            reference to instance of type T (not function type)
     120           pointer to instance of type T (not function type)
    64121         ... returning nothing
    65122
    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)
    71125
    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
    76140
    77141
    78        function
    79      ... with parameters
    80        pointer to instance of type T (not function type)
    81      ... returning nothing
    82 
    83    ... to arguments
    84      Variable Expression: z: pointer to instance of type T (not function type)
    85 
    86  (types:
    87    void
    88  )
    89  Environment:( _99_0_T ) -> instance of type T (not function type) (no widening)
    90 
    91 
    92 
  • tests/.expect/loopctrl.txt

    rdeca0f5 r8c3a0336  
    191910 8 6 4 2
    2020
     211 2 3 4 5 6 7 8 9 10
     2210 9 8 7 6 5 4 3 2 1 0
    21232 4 6 8 10
    22242.1 3.8 5.5 7.2 8.9
     
    4244(10 10)(9 9)(8 8)(7 7)(6 6)(5 5)(4 4)(3 3)(2 2)(1 1)(0 0)
    4345(10 10)(9 9)(8 8)(7 7)(6 6)(5 5)(4 4)(3 3)(2 2)(1 1)(0 0)
     46
     470 -5 1 -4 2 -3 3 -2 4 -1 5 0 6 1 7 2 8 3 9 4
     480 -5 1 -6 2 -7 3 -8 4 -9 5 -10 6 -11 7 -12 8 -13 9 -14
     490 -5 1 -3 2 -1 3 1 4 3 5 5 6 7 7 9 8 11 9 13
     500 -5 1 -7 2 -9 3 -11 4 -13 5 -15 6 -17 7 -19 8 -21 9 -23
     51
     520 -5 1 -4 2 -3 3 -2 4 -1 5 0 6 1 7 2 8 3 9 4
     530 -5 1 -6 2 -7 3 -8 4 -9 5 -10 6 -11 7 -12 8 -13 9 -14
     540 -5 1 -3 2 -1 3 1 4 3 5 5 6 7 7 9 8 11 9 13
     550 -5 1 -7 2 -9 3 -11 4 -13 5 -15 6 -17 7 -19 8 -21 9 -23
     56
     570 -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
     580 -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
     590 -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  
    4444CC = @CFACC@
    4545
    46 PRETTY_PATH=cd ${srcdir} &&
     46PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
    4747
    4848.PHONY: list .validate
     
    8585#----------------------------------------------------------------------------------------------------------------
    8686
     87# Use for all tests, make sure the path are correct and all flags are added
     88CFACOMPILETEST=$(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
     91CFATEST_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
     94CFATEST_STDERR=$(CFACOMPILETEST) 2> $(abspath ${@})
     95
     96#----------------------------------------------------------------------------------------------------------------
     97
    8798# implicit rule so not all test require a rule
    8899% : %.cfa $(CFACC)
    89         $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     100        $(CFATEST_STDOUT)
    90101
    91102% : %.cpp
    92103        $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    93104
    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
     109declarationSpecifier_FLAGS= -CFA -XCFA -p
     110gccExtensions_FLAGS= -CFA -XCFA -p
     111extension_FLAGS= -CFA -XCFA -p
     112attributes_FLAGS= -CFA -XCFA -p
     113functions_FLAGS= -CFA -XCFA -p
     114KRfunctions_FLAGS= -CFA -XCFA -p
     115gmp_FLAGS= -lgmp
    96116
    97 gccExtensions : gccExtensions.cfa $(CFACC)
    98         $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     117#------------------------------------------------------------------------------
     118# Expected failures
     119completeTypeError_FLAGS= -DERR1
    99120
    100 extension : extension.cfa $(CFACC)
    101         $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     121#------------------------------------------------------------------------------
     122# CUSTOM TARGET
     123#------------------------------------------------------------------------------
     124typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
     125        $(CFATEST_STDOUT) -DERR1
    102126
    103 attributes : attributes.cfa $(CFACC)
    104         $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     127alloc-ERROR: alloc.cfa $(CFACC)
     128        $(CFATEST_STDOUT) -DERR1
    105129
    106 functions: functions.cfa $(CFACC)
    107         $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     130nested-types-ERR1: nested-types.cfa $(CFACC)
     131        $(CFATEST_STDOUT) -DERR1
    108132
    109 KRfunctions : KRfunctions.cfa $(CFACC)
    110         $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     133nested-types-ERR2: nested-types.cfa $(CFACC)
     134        $(CFATEST_STDOUT) -DERR2
    111135
    112 sched-ext-parse : sched-ext-parse.c $(CFACC)
    113         $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     136raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
     137        $(CFATEST_STDOUT) -DERR1
    114138
    115 gmp : gmp.cfa $(CFACC)
    116         $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     139raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
     140        $(CFATEST_STDOUT) -DERR2
     141
     142raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
     143        $(CFATEST_STDOUT) -DERR1
     144
     145raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
     146        $(CFATEST_STDOUT) -DERR1
    117147
    118148#builtins
    119149builtins/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
    155151
    156152# Warnings
    157153warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
    158         $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
     154        $(CFATEST_STDERR) -fsyntax-only
  • tests/Makefile.in

    rdeca0f5 r8c3a0336  
    386386        -quiet @CFA_FLAGS@ -DIN_DIR="${abs_srcdir}/.in/" \
    387387        ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
    388 PRETTY_PATH = cd ${srcdir} &&
     388PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
    389389avl_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
    390390# automake doesn't know we still need C/CPP rules so pretend like we have a C program
    391391_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
     396CFACOMPILETEST = $(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
     399CFATEST_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
     402CFATEST_STDERR = $(CFACOMPILETEST) 2> $(abspath ${@})
     403
     404#------------------------------------------------------------------------------
     405# TARGET WITH STANDARD RULE BUT CUSTOM FLAGS
     406#------------------------------------------------------------------------------
     407# Expected failures
     408declarationSpecifier_FLAGS = -CFA -XCFA -p
     409gccExtensions_FLAGS = -CFA -XCFA -p
     410extension_FLAGS = -CFA -XCFA -p
     411attributes_FLAGS = -CFA -XCFA -p
     412functions_FLAGS = -CFA -XCFA -p
     413KRfunctions_FLAGS = -CFA -XCFA -p
     414gmp_FLAGS = -lgmp
     415
     416#------------------------------------------------------------------------------
     417# Expected failures
     418completeTypeError_FLAGS = -DERR1
    392419all: all-am
    393420
     
    772799# implicit rule so not all test require a rule
    773800% : %.cfa $(CFACC)
    774         $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
     801        $(CFATEST_STDOUT)
    775802
    776803% : %.cpp
    777804        $(PRETTY_PATH) $(CXXCOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    778805
    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#------------------------------------------------------------------------------
     809typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
     810        $(CFATEST_STDOUT) -DERR1
     811
     812alloc-ERROR: alloc.cfa $(CFACC)
     813        $(CFATEST_STDOUT) -DERR1
     814
     815nested-types-ERR1: nested-types.cfa $(CFACC)
     816        $(CFATEST_STDOUT) -DERR1
     817
     818nested-types-ERR2: nested-types.cfa $(CFACC)
     819        $(CFATEST_STDOUT) -DERR2
     820
     821raii/dtor-early-exit-ERR1: raii/dtor-early-exit.cfa $(CFACC)
     822        $(CFATEST_STDOUT) -DERR1
     823
     824raii/dtor-early-exit-ERR2: raii/dtor-early-exit.cfa $(CFACC)
     825        $(CFATEST_STDOUT) -DERR2
     826
     827raii/memberCtors-ERR1: raii/memberCtors.cfa $(CFACC)
     828        $(CFATEST_STDOUT) -DERR1
     829
     830raii/ctor-autogen-ERR1: raii/ctor-autogen.cfa $(CFACC)
     831        $(CFATEST_STDOUT) -DERR1
    802832
    803833#builtins
    804834builtins/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
    840836
    841837# Warnings
    842838warnings/self-assignment: warnings/self-assignment.cfa $(CFACC)
    843         $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
     839        $(CFATEST_STDERR) -fsyntax-only
    844840
    845841# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • tests/completeTypeError.cfa

    rdeca0f5 r8c3a0336  
    55forall(dtype T | sized(T)) void quux(T *);
    66
    7 struct A; // incomplete
    8 struct B {}; // complete
     7struct A;       // incomplete
     8struct B {};    // complete
    99
    1010int main() {
    11         int *i;
    12         void *v;
     11        int * i;
     12        void * v;
    1313
    1414        A * x;
     
    1919        // okay
    2020        *i;
    21         *x; // picks B
     21        *y;
    2222        *z;
    2323        foo(i);
     
    3232        // bad
    3333        *v;
    34         *y;
     34        *x;     // ambiguous
    3535        foo(v);
    3636        baz(v);
     
    5252void qux(T * y) {
    5353        // okay
     54        *y;
    5455        bar(y);
    5556        qux(y);
     
    5859        baz(y);
    5960        quux(y);
    60         *y;
    6161}
    6262
  • tests/coroutine/devicedriver.cfa

    rdeca0f5 r8c3a0336  
    1010// Created On       : Sat Mar 16 15:30:34 2019
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Mar 19 15:59:06 2019
    13 // Update Count     : 87
     12// Last Modified On : Sat Apr 20 09:07:19 2019
     13// Update Count     : 90
    1414//
    1515
     
    6767        char msg[65], byte;
    6868        Driver driver = { msg };
     69
     70        sin | nlOn;                                                                                     // read newline (all) characters
    6971  eof: for () {                                                                                 // read until end of file
    7072                sin | byte;                                                                             // read one character
  • tests/function-operator.cfa

    rdeca0f5 r8c3a0336  
    1010// Created On       : Fri Aug 25 15:21:11 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec  4 21:37:09 2018
    13 // Update Count     : 9
     12// Last Modified On : Thu Apr 11 18:27:45 2019
     13// Update Count     : 10
    1414//
    1515
     
    6262
    6363// 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))
     64forall(otype Generator, otype GenRet | { GenRet ?()(Generator &); }, dtype Iter, otype T | Iterator(Iter, T) | Assignable(T, GenRet))
    6565void generate(Iter first, Iter last, Generator & gen) {
    6666        int i = 0;
  • tests/io2.cfa

    rdeca0f5 r8c3a0336  
    1010// Created On       : Wed Mar  2 16:56:02 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Dec 21 08:20:14 2018
    13 // Update Count     : 112
     12// Last Modified On : Thu Apr 18 08:03:30 2019
     13// Update Count     : 113
    1414//
    1515
     
    9797        sout | 1 | sepOff | 2 | 3;                                                      // locally turn off implicit separator
    9898        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;                                       // no separator at start of next line
     99        sout | 1 | 2 | 3 | "\n\n" | sepOn | nonl;                       // no separator at start of next line
    100100        sout | 1 | 2 | 3;
    101101        sout | nl;
  • tests/loopctrl.cfa

    rdeca0f5 r8c3a0336  
    1010// Created On       : Wed Aug  8 18:32:59 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 21 08:54:47 2019
    13 // Update Count     : 86
     12// Last Modified On : Sat Apr 13 11:03:09 2019
     13// Update Count     : 104
    1414//
    1515
     
    5656        for ( ui; 10u -~= 2u ~ 2u ) { sout | ui; }                      sout | nl | nl;
    5757
     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;
    5867        for ( i; 2 ~ @ ~ 2 ) {
    5968          if ( i > 10 ) break;
     
    94103        for ( s; (S){10,10} -~ (S){0} ~ (S){1} ) { sout | s; } sout | nl;
    95104        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;
    97120}
    98121
Note: See TracChangeset for help on using the changeset viewer.