Changeset ddbde34


Ignore:
Timestamp:
May 11, 2017, 2:04:06 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
a28bc02
Parents:
9923861
Message:

update memberCtors test case with more output

Location:
src/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/tests/.expect/memberCtors.txt

    r9923861 rddbde34  
    1616assigning int: 0 0
    1717end construct A
     18copy constructing int: 0
     19copy constructing int: 0
     20begin copy construct A
     21copy construct this->x
     22copy constructing int: 1001
     23assign this->y
     24copy constructing int: 0
     25destructing int: 0
     26destructing int: 0
     27end copy construct A
     28begin ?=? A
     29copy constructing int: 1001
     30destructing int: 1001
     31destructing int: 1001
     32copy constructing int: 0
     33destructing int: 0
     34destructing int: 0
     35copy constructing int: 0
     36destructing int: 0
     37destructing int: 0
     38end ?=? A
     39copy constructing int: 0
     40copy constructing int: 0
     41begin copy construct A
     42copy construct this->x
     43copy constructing int: 1001
     44assign this->y
     45copy constructing int: 0
     46destructing int: 0
     47destructing int: 0
     48end copy construct A
     49destructing int: 0
     50destructing int: 0
     51destructing int: 1001
     52destructing int: 0
     53destructing int: 0
     54destructing int: 1001
    1855construct b->a1
    1956constructing int
     
    3673copy constructing int: 1000
    3774assign this->y
    38 end copy construct A
    39 copy constructing int: 0
    40 copy constructing int: 0
    41 begin copy construct A
    42 copy construct this->x
    43 copy constructing int: 1001
    44 assign this->y
    45 end copy construct A
    46 copy constructing int: 0
    47 copy constructing int: 0
    48 begin copy construct A
    49 copy construct this->x
    50 copy constructing int: 0
    51 assign this->y
     75copy constructing int: 0
     76destructing int: 0
     77destructing int: 0
     78end copy construct A
     79copy constructing int: 0
     80copy constructing int: 0
     81begin copy construct A
     82copy construct this->x
     83copy constructing int: 1001
     84assign this->y
     85copy constructing int: 0
     86destructing int: 0
     87destructing int: 0
     88end copy construct A
     89copy constructing int: 0
     90copy constructing int: 0
     91begin copy construct A
     92copy construct this->x
     93copy constructing int: 0
     94assign this->y
     95copy constructing int: 0
     96destructing int: 0
     97destructing int: 0
    5298end copy construct A
    5399End of main
     
    60106assigning int: 0 0
    61107end construct A
     108copy constructing int: 0
     109copy constructing int: 0
     110begin copy construct A
     111copy construct this->x
     112copy constructing int: 999
     113assign this->y
     114copy constructing int: 0
     115destructing int: 0
     116destructing int: 0
     117end copy construct A
     118begin ?=? A
     119copy constructing int: 999
     120destructing int: 999
     121destructing int: 999
     122copy constructing int: 0
     123destructing int: 0
     124destructing int: 0
     125copy constructing int: 0
     126destructing int: 0
     127destructing int: 0
     128end ?=? A
     129copy constructing int: 0
     130copy constructing int: 0
     131begin copy construct A
     132copy construct this->x
     133copy constructing int: 999
     134assign this->y
     135copy constructing int: 0
     136destructing int: 0
     137destructing int: 0
     138end copy construct A
     139destructing int: 0
     140destructing int: 0
     141destructing int: 999
     142destructing int: 0
     143destructing int: 0
     144destructing int: 999
    62145destructing int: 0
    63146destructing int: 0
     
    80163assigning int: 0 0
    81164end construct A
     165copy constructing int: 0
     166copy constructing int: 0
     167begin copy construct A
     168copy construct this->x
     169copy constructing int: 999
     170assign this->y
     171copy constructing int: 0
     172destructing int: 0
     173destructing int: 0
     174end copy construct A
     175begin ?=? A
     176copy constructing int: 999
     177destructing int: 999
     178destructing int: 999
     179copy constructing int: 0
     180destructing int: 0
     181destructing int: 0
     182copy constructing int: 0
     183destructing int: 0
     184destructing int: 0
     185end ?=? A
     186copy constructing int: 0
     187copy constructing int: 0
     188begin copy construct A
     189copy construct this->x
     190copy constructing int: 999
     191assign this->y
     192copy constructing int: 0
     193destructing int: 0
     194destructing int: 0
     195end copy construct A
     196destructing int: 0
     197destructing int: 0
     198destructing int: 999
     199destructing int: 0
     200destructing int: 0
     201destructing int: 999
    82202destructing int: 0
    83203destructing int: 0
  • src/tests/memberCtors.c

    r9923861 rddbde34  
    5353} // z never constructed - will be automatically copy constructed
    5454
     55A ?=?(A * this, A other) {
     56  printf("begin ?=? A\n");
     57  this->x = other.x;
     58  this->y = other.y;
     59  this->z = other.z;
     60  printf("end ?=? A\n");
     61  return *this;
     62}
     63
    5564struct B {
    5665  A a1, a2, a3;
Note: See TracChangeset for help on using the changeset viewer.