- Timestamp:
- Jul 29, 2020, 11:29:01 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 0c760db
- Parents:
- 1d17939
- Location:
- tests
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/avltree/avl1.cfa
r1d17939 rb81fd95 24 24 tree(K, V) * create(K key, V value) { 25 25 // infinite loop trying to resolve ... t = malloc(); 26 tree(K, V) * t = malloc(sizeof(tree(K,V)));26 tree(K, V) * t = ( tree(K, V) * ) malloc(sizeof(tree(K,V))); 27 27 (*t){ key, value }; 28 28 return t; -
tests/bugs/66.cfa
r1d17939 rb81fd95 5 5 6 6 int main() { 7 int * next = (void*)0;7 int * next = 0p; 8 8 if( next ) { 9 9 return 1; -
tests/concurrent/signal/block.cfa
r1d17939 rb81fd95 82 82 if( !is_empty( cond ) ) { 83 83 84 $thread * next = front( cond );84 $thread * next = ( $thread * ) front( cond ); 85 85 86 86 if( ! signal_block( cond ) ) { -
tests/exceptions/conditional.cfa
r1d17939 rb81fd95 17 17 }; 18 18 19 voidnum_error_msg(num_error * this) {19 const char * num_error_msg(num_error * this) { 20 20 if ( ! this->msg ) { 21 21 static const char * base = "Num Error with code: X"; -
tests/exceptions/defaults.cfa
r1d17939 rb81fd95 13 13 } 14 14 15 c har * get_log_message(log_message * this) {15 const char * get_log_message(log_message * this) { 16 16 return this->msg; 17 17 } … … 28 28 // We can catch log: 29 29 try { 30 throwResume (log_message){ (char *)"Should be printed.\n"};30 throwResume (log_message){"Should be printed.\n"}; 31 31 } catchResume (log_message * this) { 32 32 printf("%s", this->virtual_table->msg(this)); 33 33 } 34 34 // But we don't have to: 35 throwResume (log_message){ (char *)"Should not be printed.\n"};35 throwResume (log_message){"Should not be printed.\n"}; 36 36 } 37 37 -
tests/io2.cfa
r1d17939 rb81fd95 121 121 122 122 [int, int, const char *, double] t3 = { 3, 4, "a", 7.2 }; 123 sout | [ 3, 4, "a", 7.2 ];123 sout | [ 3, 4, (const char*)"a", 7.2 ]; // workaround trac#207: the const cast should not be needed 124 124 sout | t3; 125 125 sepSetTuple( sout, " " ); -
tests/searchsort.cfa
r1d17939 rb81fd95 38 38 } // for 39 39 sout | nl; 40 for ( i; 0 ~ size ) { // C version 40 for ( i; 0 ~ size ) { // C version, returns void* 41 41 int key = size - i; 42 int * v = bsearch( &key, iarr, size, sizeof( iarr[0] ), comp );42 int * v = ( int * ) bsearch( &key, iarr, size, sizeof( iarr[0] ), comp ); 43 43 sout | key | ':' | *v | ", "; 44 44 } // for
Note: See TracChangeset
for help on using the changeset viewer.