- Timestamp:
- Aug 3, 2020, 2:23:17 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:
- 1a39a5a
- Parents:
- 3e2b9c9 (diff), 6dba8755 (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. - Location:
- tests
- Files:
-
- 6 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/castError.txt
r3e2b9c9 r95789be 1 castError.cfa:2 1:1 error: Cannot choose between 3 alternatives for expression1 castError.cfa:23:1 error: Cannot choose between 3 alternatives for expression 2 2 Explicit Cast of: 3 3 Name: f … … 35 35 36 36 37 castError.cfa:2 6:1 error: Cannot choose between 2 alternatives for expression37 castError.cfa:28:1 error: Cannot choose between 2 alternatives for expression 38 38 Generated Cast of: 39 39 Comma Expression: … … 62 62 63 63 64 castError.cfa:30:1 error: No reasonable alternatives for expression Explicit Cast of: 65 Name: sint 66 ... to: 67 instance of struct S with body 1 68 ... with parameters 69 char 70 -
tests/avltree/avl1.cfa
r3e2b9c9 r95789be 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
r3e2b9c9 r95789be 5 5 6 6 int main() { 7 int * next = (void*)0;7 int * next = 0p; 8 8 if( next ) { 9 9 return 1; -
tests/castError.cfa
r3e2b9c9 r95789be 14 14 // 15 15 16 forall(otype T) struct S { T p; }; 16 17 int f; 18 S(int) sint; 17 19 18 20 void f() { … … 25 27 short int v; 26 28 3, v; // implicit void cast 29 30 (S(char)) sint; 27 31 } 28 32 -
tests/concurrent/signal/block.cfa
r3e2b9c9 r95789be 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
r3e2b9c9 r95789be 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
r3e2b9c9 r95789be 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
r3e2b9c9 r95789be 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
r3e2b9c9 r95789be 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.