Changeset c880a7b for tests


Ignore:
Timestamp:
Jun 4, 2023, 8:39:25 AM (19 months ago)
Author:
caparsons <caparson@…>
Branches:
ast-experimental, master
Children:
84334d0
Parents:
0794365
Message:

refactored tests to use new name for allocation enum

Location:
tests/concurrency/actors
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/actors/dynamic.cfa

    r0794365 rc880a7b  
    1919void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; }
    2020
    21 Allocation receive( derived_actor & receiver, derived_msg & msg ) {
     21allocation receive( derived_actor & receiver, derived_msg & msg ) {
    2222    if ( msg.cnt >= Times ) {
    2323        sout | "Done";
  • tests/concurrency/actors/executor.cfa

    r0794365 rc880a7b  
    2424struct d_msg { inline message; } shared_msg;
    2525
    26 Allocation receive( d_actor & this, d_msg & msg ) with( this ) {
     26allocation receive( d_actor & this, d_msg & msg ) with( this ) {
    2727    if ( recs == rounds ) return Finished;
    2828    if ( recs % Batch == 0 ) {
  • tests/concurrency/actors/inherit.cfa

    r0794365 rc880a7b  
    1515void ^?{}( D_msg & this ) { mutex(sout) sout | 'A'; }
    1616
    17 Allocation handle() {
     17allocation handle() {
    1818    return Finished;
    1919}
    2020
    21 Allocation receive( Server & receiver, D_msg & msg ) { return handle(); }
    22 Allocation receive( Server & receiver, D_msg2 & msg ) { return handle(); }
    23 Allocation receive( Server2 & receiver, D_msg & msg ) { return Delete; }
    24 Allocation receive( Server2 & receiver, D_msg2 & msg ) { return Delete; }
     21allocation receive( Server & receiver, D_msg & msg ) { return handle(); }
     22allocation receive( Server & receiver, D_msg2 & msg ) { return handle(); }
     23allocation receive( Server2 & receiver, D_msg & msg ) { return Delete; }
     24allocation receive( Server2 & receiver, D_msg2 & msg ) { return Delete; }
    2525
    2626int main() {
  • tests/concurrency/actors/matrix.cfa

    r0794365 rc880a7b  
    2424}
    2525
    26 Allocation receive( derived_actor & receiver, derived_msg & msg ) {
     26allocation receive( derived_actor & receiver, derived_msg & msg ) {
    2727    for ( unsigned int i = 0; i < yc; i += 1 ) { // multiply X_row by Y_col and sum products
    2828        msg.Z[i] = 0;
  • tests/concurrency/actors/pingpong.cfa

    r0794365 rc880a7b  
    1919size_t times = 100000;
    2020
    21 Allocation receive( ping & receiver, p_msg & msg ) {
     21allocation receive( ping & receiver, p_msg & msg ) {
    2222    msg.count++;
    2323    if ( msg.count > times ) return Finished;
    2424
    25     Allocation retval = Nodelete;
     25    allocation retval = Nodelete;
    2626    if ( msg.count == times ) retval = Finished;
    2727    *po << msg;
     
    2929}
    3030
    31 Allocation receive( pong & receiver, p_msg & msg ) {
     31allocation receive( pong & receiver, p_msg & msg ) {
    3232    msg.count++;
    3333    if ( msg.count > times ) return Finished;
    3434   
    35     Allocation retval = Nodelete;
     35    allocation retval = Nodelete;
    3636    if ( msg.count == times ) retval = Finished;
    3737    *pi << msg;
  • tests/concurrency/actors/static.cfa

    r0794365 rc880a7b  
    1919void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; }
    2020
    21 Allocation receive( derived_actor & receiver, derived_msg & msg ) {
     21allocation receive( derived_actor & receiver, derived_msg & msg ) {
    2222    if ( msg.cnt >= Times ) {
    2323        sout | "Done";
  • tests/concurrency/actors/types.cfa

    r0794365 rc880a7b  
    2020
    2121// this isn't a valid receive routine since int is not a message type
    22 Allocation receive( derived_actor & receiver, int i ) with( receiver ) {
     22allocation receive( derived_actor & receiver, int i ) with( receiver ) {
    2323    mutex(sout) sout | i;
    2424    counter++;
     
    2727}
    2828
    29 Allocation receive( derived_actor & receiver, d_msg & msg ) {
     29allocation receive( derived_actor & receiver, d_msg & msg ) {
    3030    return receive( receiver, msg.num );
    3131}
     
    3636};
    3737
    38 Allocation receive( derived_actor2 & receiver, d_msg & msg ) {
     38allocation receive( derived_actor2 & receiver, d_msg & msg ) {
    3939    mutex(sout) sout | msg.num;
    4040    return Finished;
     
    4848};
    4949
    50 Allocation receive( derived_actor3 & receiver, d_msg & msg ) {
     50allocation receive( derived_actor3 & receiver, d_msg & msg ) {
    5151    mutex(sout) sout | msg.num;
    5252    if ( msg.num == -1 ) return Nodelete;
     
    5454}
    5555
    56 Allocation receive( derived_actor3 & receiver, d_msg2 & msg ) {
     56allocation receive( derived_actor3 & receiver, d_msg2 & msg ) {
    5757    mutex(sout) sout | msg.num;
    5858    return Finished;
Note: See TracChangeset for help on using the changeset viewer.