Changes in / [0a346e5:21eb693]
- Location:
- src/tests
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/Cast.c
r0a346e5 r21eb693 9 9 (int)f; 10 10 (void(*)())f; 11 ([long, long double, *[]()])([f, f, f]);11 // ([long, long double, *[]()])([f, f, f]); 12 12 } 13 13 -
src/tests/CommentMisc.c
r0a346e5 r21eb693 1 /* single line */2 // single line3 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 /* 1st14 2nd */ int i;15 16 /*17 */18 19 /*20 21 */22 23 /*24 1st25 */26 27 /*28 1st29 2nd30 */31 32 // ignore preprocessor directives33 34 #line 235 #36 #include <fred>37 #define mary abc38 39 1 // alternative ANSI99 brackets 40 2 -
src/tests/Constant0-1.c
r0a346e5 r21eb693 1 //Constant test declaration 2 // Cforall extension 1 // Constant test declaration 3 2 4 3 // value … … 6 5 int 0; 7 6 const int 0; 8 static const int 0;9 7 int 1; 10 8 const int 1; 11 static const int 1; 12 int 0, 1; 13 const int 0, 1; 9 struct { int i; } 0; 10 const struct { int i; } 1; 11 12 #ifdef DUPS 13 14 int 0; 15 const int 0; 16 int 1; 17 const int 1; 14 18 int (0), (1); 15 19 int ((0)), ((1)); 16 static const int 0, 1; 20 const int 0, 1; 21 const int (0), (1); 17 22 struct { int i; } 0; 18 23 const struct { int i; } 1; 19 static const struct { int i; } 1; 24 25 #endif // DUPS 26 27 #ifndef NEWDECL 20 28 21 29 // 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 22 38 23 39 int *0, *1; … … 28 44 int (* const 0), (* const 1); 29 45 int ((* const 0)), ((* const 1)); 46 int (*(* const x)), *(*0); 47 int (*(* const x)), (*(*0)); 30 48 struct { int i; } *0; 49 const struct { int i; } *0; 50 int (*(* const x)), **0; 51 52 #endif // DUPS 53 54 #else 31 55 32 56 // Cforall style … … 34 58 * int x, 0; 35 59 const * int x, 0; 36 static const * int x, 0;37 60 * struct { int i; } 0; 38 61 const * struct { int i; } 0; 39 static const * struct { int i; } 0;40 static * int x, 0;41 static const * int x, 0;42 62 const * * int x, 0; 43 63 64 #ifdef DUPS 65 66 * int x, 0; 67 const * int x, 0; 68 69 #endif // DUPS 70 71 #endif // NEWDECL 72 44 73 int main() { 74 #ifndef NEWDECL 45 75 int 1, * 0; 76 #else 46 77 * int x, 0; 78 #endif // NEWDECL 47 79 } -
src/tests/Context.c
r0a346e5 r21eb693 1 //cforall context declaration 1 // trait declaration 2 2 3 trait has_q( otype T ) { 3 4 T q( T ); … … 5 6 6 7 forall( otype z | has_q( z ) ) void f() { 7 context has_r( otype T, otype U ) {8 trait has_r( otype T, otype U ) { 8 9 T r( T, T (T,U) ); 9 10 }; -
src/tests/Exception.c
r0a346e5 r21eb693 10 10 try { 11 11 x/4; 12 } catch( int ) {12 } catch( int ) { 13 13 } catch( int x ) { 14 14 } catch( struct { int i; } ) { -
src/tests/Expression.c
r0a346e5 r21eb693 1 int fred() {2 struct s { int i; } *p;3 int i ;1 int main() { 2 struct s { int i; } x, *p = &x; 3 int i = 3; 4 4 5 // order of evaluation (GCC is different)6 /*7 i = sizeof( (int) {3} );8 i = sizeof (int) {3};9 */10 5 // operators 11 6 … … 42 37 i||i; 43 38 p->i; 44 i+=i;45 i-=i;46 39 i*=i; 47 40 i/=i; 48 41 i%=i; 42 i+=i; 43 i-=i; 49 44 i&=i; 50 45 i|=i; … … 54 49 55 50 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 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Mon J an 25 22:31:42 201614 ## Update Count : 2513 ## Last Modified On : Mon Jun 20 14:30:52 2016 14 ## Update Count : 33 15 15 ############################################################################### 16 16 … … 23 23 vector_test_SOURCES = vector/vector_int.c vector/array.c vector/vector_test.c 24 24 avl_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
r0a346e5 r21eb693 621 621 622 622 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 623 632 # Tell versions [3.59,3.63) of GNU make to not export all variables. 624 633 # Otherwise a system limit (for SysV at least) may be exceeded.
Note: See TracChangeset
for help on using the changeset viewer.