- File:
-
- 1 edited
-
tests/concurrent/actors/poison.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/actors/poison.cfa
r1950837 r858350a 5 5 #include <stdio.h> 6 6 7 struct Server { int val; inline actor; }; 8 9 void ?{}( Server & this ) { this.val = 999; } 10 void ^?{}( Server & this ) { this.val = 777; } 7 struct Server { inline actor; }; 11 8 12 9 int main() { … … 15 12 sout | "Finished"; 16 13 { 17 start_actor_system();18 Server s[10];19 for ( i; 10 ) {20 s[i] << FinishedMsg;21 }22 stop_actor_system();14 start_actor_system(); 15 Server s[10]; 16 for ( i; 10 ) { 17 s[i] << FinishedMsg; 18 } 19 stop_actor_system(); 23 20 } 24 21 25 22 sout | "Delete"; 26 23 { 27 start_actor_system();28 for ( i; 10 ) {29 Server * s = alloc();30 (*s){};31 (*s) << DeleteMsg;32 }33 stop_actor_system();24 start_actor_system(); 25 for ( i; 10 ) { 26 Server * s = alloc(); 27 (*s){}; 28 (*s) << DeleteMsg; 29 } 30 stop_actor_system(); 34 31 } 35 32 36 33 sout | "Destroy"; 37 34 { 38 start_actor_system(); 39 Server s[10]; 40 for ( i; 10 ) 41 s[i] << DestroyMsg; 42 stop_actor_system(); 43 for ( i; 10 ) 44 if (s[i].val != 777) 45 sout | "Error: dtor not called correctly."; 35 start_actor_system(); 36 Server s[10]; 37 for ( i; 10 ) { 38 s[i] << DestroyMsg; 39 } 40 stop_actor_system(); 46 41 } 47 42
Note:
See TracChangeset
for help on using the changeset viewer.