VirtualBox

Changeset 37861 in vbox for trunk/src/VBox/Runtime/testcase


Ignore:
Timestamp:
Jul 11, 2011 10:03:22 AM (14 years ago)
Author:
vboxsync
Message:

IPRT: fix assigning of empty lists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstIprtList.cpp

    r36563 r37861  
    362362    RTTESTI_CHECK_RETV(testList.size() == 0);
    363363    RTTESTI_CHECK(testList.capacity()  == defCap);
     364
     365
     366    /* Copy empty lists. */
     367    L<T1, T2> testList5(testList);
     368    RTTESTI_CHECK_RETV(testList5.isEmpty());
     369    RTTESTI_CHECK_RETV(testList5.size() == 0);
     370    RTTESTI_CHECK(testList5.capacity()  == 0);
     371
     372    testList5.append(paTestData[0]);
     373    testList5 = testList;
     374    RTTESTI_CHECK_RETV(testList5.isEmpty());
     375    RTTESTI_CHECK_RETV(testList5.size() == 0);
     376    RTTESTI_CHECK(testList5.capacity()  == 0);
     377
    364378}
    365379
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette