Changes in / [21eb693:0a346e5]


Ignore:
Location:
src/tests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • src/tests/Cast.c

    r21eb693 r0a346e5  
    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

    r21eb693 r0a346e5  
     1/* single line */
     2// single line
     3
     4// single line containing */
     5// single line containing /*
     6// single line containing /* */
     7
     8/* 1st */ int i;
     9int 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
    139// alternative ANSI99 brackets
    240
  • src/tests/Constant0-1.c

    r21eb693 r0a346e5  
    1 // Constant test declaration
     1//Constant test declaration
     2// Cforall extension
    23
    34// value
     
    56int 0;
    67const int 0;
     8static const int 0;
    79int 1;
    810const int 1;
     11static const int 1;
     12int 0, 1;
     13const int 0, 1;
     14int (0), (1);
     15int ((0)), ((1));
     16static const int 0, 1;
    917struct { int i; } 0;
    1018const struct { int i; } 1;
    11 
    12 #ifdef DUPS
    13 
    14 int 0;
    15 const int 0;
    16 int 1;
    17 const int 1;
    18 int (0), (1);
    19 int ((0)), ((1));
    20 const int 0, 1;
    21 const int (0), (1);
    22 struct { int i; } 0;
    23 const struct { int i; } 1;
    24 
    25 #endif // DUPS
    26 
    27 #ifndef NEWDECL
     19static const struct { int i; } 1;
    2820
    2921// pointer
    30 
    31 int *0, *1;
    32 int * const (0), * const 1;
    33 struct { int i; } *0;
    34 const struct { int i; } *0;
    35 int (*(* const x)), **0;
    36 
    37 #ifdef DUPS
    3822
    3923int *0, *1;
     
    4428int (* const 0), (* const 1);
    4529int ((* const 0)), ((* const 1));
    46 int (*(* const x)), *(*0);
    47 int (*(* const x)), (*(*0));
    4830struct { int i; } *0;
    49 const struct { int i; } *0;
    50 int (*(* const x)), **0;
    51 
    52 #endif // DUPS
    53 
    54 #else
    5531
    5632// Cforall style
     
    5834* int x, 0;
    5935const * int x, 0;
     36static const * int x, 0;
    6037* struct { int i; } 0;
    6138const * struct { int i; } 0;
     39static const * struct { int i; } 0;
     40static * int x, 0;
     41static const * int x, 0;
    6242const * * int x, 0;
    6343
    64 #ifdef DUPS
    65 
    66 * int x, 0;
    67 const * int x, 0;
    68 
    69 #endif // DUPS
    70 
    71 #endif // NEWDECL
    72 
    7344int main() {
    74 #ifndef NEWDECL
    7545    int 1, * 0;
    76 #else
    7746    * int x, 0;
    78 #endif // NEWDECL
    7947}
  • src/tests/Context.c

    r21eb693 r0a346e5  
    1 // trait declaration
    2 
     1//cforall context declaration
    32trait has_q( otype T ) {
    43        T q( T );
     
    65
    76forall( otype z | has_q( z ) ) void f() {
    8         trait has_r( otype T, otype U ) {
     7        context has_r( otype T, otype U ) {
    98                T r( T, T (T,U) );
    109        };
  • src/tests/Exception.c

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

    r21eb693 r0a346e5  
    1 int main() {
    2     struct s { int i; } x, *p = &x;
    3     int i = 3;
     1int fred() {
     2    struct s { int i; } *p;
     3    int i;
    44
     5    // order of evaluation (GCC is different)
     6/*
     7    i = sizeof( (int) {3} );
     8    i = sizeof (int) {3};
     9*/
    510    // operators
    611
     
    3742    i||i;
    3843    p->i;
     44    i+=i;
     45    i-=i;
    3946    i*=i;
    4047    i/=i;
    4148    i%=i;
    42     i+=i;
    43     i-=i;
    4449    i&=i;
    4550    i|=i;
     
    4954
    5055    i?i:i;
    51 } // main
     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
     70int main(int argc, char const *argv[])
     71{
     72        return 0;
     73}
  • src/tests/Makefile.am

    r21eb693 r0a346e5  
    1111## Created On       : Sun May 31 09:08:15 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Mon Jun 20 14:30:52 2016
    14 ## Update Count     : 33
     13## Last Modified On : Mon Jan 25 22:31:42 2016
     14## Update Count     : 25
    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 
    26 Constant0-1DP : Constant0-1.c
    27         ${CC} ${CFLAGS} -DDUPS ${<} -o ${@}
    28 
    29 Constant0-1ND : Constant0-1.c
    30         ${CC} ${CFLAGS} -DNEWDECL ${<} -o ${@}
    31 
    32 Constant0-1NDDP : Constant0-1.c
    33         ${CC} ${CFLAGS} -DNEWDECL -DDUPS ${<} -o ${@}
  • src/tests/Makefile.in

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