Changes in / [0a346e5:21eb693]


Ignore:
Location:
src/tests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • src/tests/Cast.c

    r0a346e5 r21eb693  
    99        (int)f;
    1010        (void(*)())f;
    11         ([long, long double, *[]()])([f, f, f]);
     11//      ([long, long double, *[]()])([f, f, f]);
    1212}
    1313
  • src/tests/CommentMisc.c

    r0a346e5 r21eb693  
    1 /* single line */
    2 // single line
    3 
    4 // single line containing */
    5 // single line containing /*
    6 // single line containing /* */
    7 
    8 /* 1st */ int i;
    9 int i; /* 2nd */
    10 /* 1st */ int i; /* 2nd */
    11 /* 1st */ /* 2nd */
    12 
    13 /* 1st
    14    2nd */ int i;
    15 
    16 /*
    17 */
    18 
    19 /*
    20 
    21 */
    22 
    23 /*
    24   1st
    25 */
    26 
    27 /*
    28   1st
    29   2nd
    30 */
    31 
    32 // ignore preprocessor directives
    33 
    34 #line 2
    35  #
    36  #include <fred>
    37         #define mary abc
    38 
    391// alternative ANSI99 brackets
    402
  • src/tests/Constant0-1.c

    r0a346e5 r21eb693  
    1 //Constant test declaration
    2 // Cforall extension
     1// Constant test declaration
    32
    43// value
     
    65int 0;
    76const int 0;
    8 static const int 0;
    97int 1;
    108const int 1;
    11 static const int 1;
    12 int 0, 1;
    13 const int 0, 1;
     9struct { int i; } 0;
     10const struct { int i; } 1;
     11
     12#ifdef DUPS
     13
     14int 0;
     15const int 0;
     16int 1;
     17const int 1;
    1418int (0), (1);
    1519int ((0)), ((1));
    16 static const int 0, 1;
     20const int 0, 1;
     21const int (0), (1);
    1722struct { int i; } 0;
    1823const struct { int i; } 1;
    19 static const struct { int i; } 1;
     24
     25#endif // DUPS
     26
     27#ifndef NEWDECL
    2028
    2129// pointer
     30
     31int *0, *1;
     32int * const (0), * const 1;
     33struct { int i; } *0;
     34const struct { int i; } *0;
     35int (*(* const x)), **0;
     36
     37#ifdef DUPS
    2238
    2339int *0, *1;
     
    2844int (* const 0), (* const 1);
    2945int ((* const 0)), ((* const 1));
     46int (*(* const x)), *(*0);
     47int (*(* const x)), (*(*0));
    3048struct { int i; } *0;
     49const struct { int i; } *0;
     50int (*(* const x)), **0;
     51
     52#endif // DUPS
     53
     54#else
    3155
    3256// Cforall style
     
    3458* int x, 0;
    3559const * int x, 0;
    36 static const * int x, 0;
    3760* struct { int i; } 0;
    3861const * struct { int i; } 0;
    39 static const * struct { int i; } 0;
    40 static * int x, 0;
    41 static const * int x, 0;
    4262const * * int x, 0;
    4363
     64#ifdef DUPS
     65
     66* int x, 0;
     67const * int x, 0;
     68
     69#endif // DUPS
     70
     71#endif // NEWDECL
     72
    4473int main() {
     74#ifndef NEWDECL
    4575    int 1, * 0;
     76#else
    4677    * int x, 0;
     78#endif // NEWDECL
    4779}
  • src/tests/Context.c

    r0a346e5 r21eb693  
    1 //cforall context declaration
     1// trait declaration
     2
    23trait has_q( otype T ) {
    34        T q( T );
     
    56
    67forall( otype z | has_q( z ) ) void f() {
    7         context has_r( otype T, otype U ) {
     8        trait has_r( otype T, otype U ) {
    89                T r( T, T (T,U) );
    910        };
  • src/tests/Exception.c

    r0a346e5 r21eb693  
    1010    try {
    1111        x/4;
    12     } catch( int) {
     12    } catch( int ) {
    1313    } catch( int x ) {
    1414    } catch( struct { int i; } ) {
  • src/tests/Expression.c

    r0a346e5 r21eb693  
    1 int fred() {
    2     struct s { int i; } *p;
    3     int i;
     1int main() {
     2    struct s { int i; } x, *p = &x;
     3    int i = 3;
    44
    5     // order of evaluation (GCC is different)
    6 /*
    7     i = sizeof( (int) {3} );
    8     i = sizeof (int) {3};
    9 */
    105    // operators
    116
     
    4237    i||i;
    4338    p->i;
    44     i+=i;
    45     i-=i;
    4639    i*=i;
    4740    i/=i;
    4841    i%=i;
     42    i+=i;
     43    i-=i;
    4944    i&=i;
    5045    i|=i;
     
    5449
    5550    i?i:i;
    56 
    57     // cast
    58 /*
    59     double d;
    60     int *ip;
    61     (int *) i;
    62     (* int) i;
    63     ([char, int *])[d, d];
    64     [i,ip,ip] = ([int, * int, int *])[1,(void *)2,(void *)3];
    65     [i,ip,ip] = ([int, * int, int *])([1,(void *)2,(void *)3]);
    66 */
    67 }
    68 
    69 //Dummy main
    70 int main(int argc, char const *argv[])
    71 {
    72         return 0;
    73 }
     51} // main
  • src/tests/Makefile.am

    r0a346e5 r21eb693  
    1111## Created On       : Sun May 31 09:08:15 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Mon Jan 25 22:31:42 2016
    14 ## Update Count     : 25
     13## Last Modified On : Mon Jun 20 14:30:52 2016
     14## Update Count     : 33
    1515###############################################################################
    1616
     
    2323vector_test_SOURCES = vector/vector_int.c vector/array.c vector/vector_test.c
    2424avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
     25
     26Constant0-1DP : Constant0-1.c
     27        ${CC} ${CFLAGS} -DDUPS ${<} -o ${@}
     28
     29Constant0-1ND : Constant0-1.c
     30        ${CC} ${CFLAGS} -DNEWDECL ${<} -o ${@}
     31
     32Constant0-1NDDP : Constant0-1.c
     33        ${CC} ${CFLAGS} -DNEWDECL -DDUPS ${<} -o ${@}
  • src/tests/Makefile.in

    r0a346e5 r21eb693  
    621621
    622622
     623Constant0-1DP : Constant0-1.c
     624        ${CC} ${CFLAGS} -DDUPS ${<} -o ${@}
     625
     626Constant0-1ND : Constant0-1.c
     627        ${CC} ${CFLAGS} -DNEWDECL ${<} -o ${@}
     628
     629Constant0-1NDDP : Constant0-1.c
     630        ${CC} ${CFLAGS} -DNEWDECL -DDUPS ${<} -o ${@}
     631
    623632# Tell versions [3.59,3.63) of GNU make to not export all variables.
    624633# Otherwise a system limit (for SysV at least) may be exceeded.
Note: See TracChangeset for help on using the changeset viewer.