Changeset f6fd22a4 for tests


Ignore:
Timestamp:
Jun 14, 2023, 4:45:37 PM (12 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
994030ce
Parents:
8d6786b
Message:

refactored inherit test to avoid base ctor call bug

Location:
tests/concurrency/actors
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/actors/.expect/inherit.txt

    r8d6786b rf6fd22a4  
    44A
    55A
     6A
     7A
    68Finished
  • tests/concurrency/actors/inherit.cfa

    r8d6786b rf6fd22a4  
    77
    88struct Server { inline actor; };
     9
    910struct Server2 { inline Server; int b; };
     11void ^?{}( Server2 & this ) { mutex(sout) sout | 'A'; }
     12
    1013struct D_msg { int a; inline message; };
    11 struct D_msg2 { inline D_msg; };
    12 
    13 void ^?{}( Server2 & this ) { mutex(sout) sout | 'A'; }
    1414void ?{}( D_msg & this ) { set_allocation( this, Delete ); }
    1515void ^?{}( D_msg & this ) { mutex(sout) sout | 'A'; }
     16
     17struct D_msg2 { inline D_msg; };
    1618
    1719allocation handle() {
     
    3032        D_msg * dm = alloc();
    3133        (*dm){};
    32         D_msg2 dm2;
     34        D_msg2 * dm2 = alloc();
     35        (*dm2){};
    3336        Server2 * s = alloc();
    3437        (*s){};
     
    3639        (*s2){};
    3740        *s << *dm;
    38         *s2 << dm2;
     41        *s2 << *dm2;
    3942        stop_actor_system();
    4043    }
     
    4447        D_msg * dm = alloc();
    4548        (*dm){};
    46         D_msg2 dm2;
     49        D_msg2 * dm2 = alloc();
     50        (*dm2){};
    4751        s[0] << *dm;
    48         s[1] << dm2;
     52        s[1] << *dm2;
    4953        stop_actor_system();
    5054    }
Note: See TracChangeset for help on using the changeset viewer.