VirtualBox

Changeset 50439 in vbox for trunk/src/VBox/Main/testcase


Ignore:
Timestamp:
Feb 13, 2014 10:12:16 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92242
Message:

Moved cleanup code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/testcase/tstVBoxAPI.cpp

    r50397 r50439  
    3939*******************************************************************************/
    4040static RTTEST g_hTest;
     41static Bstr   tstMachineName = "tstVBoxAPI test VM";
    4142
    4243
     
    5455
    5556
    56 
    5757static BOOL tstApiIVirtualBox(IVirtualBox *pVBox)
    5858{
     
    121121    RTTestSub(g_hTest, "IVirtualBox::CreateMachine");
    122122    ComPtr<IMachine> ptrMachine;
    123     Bstr tstMachineName = "tstVBoxAPI test VM";
    124123    com::SafeArray<BSTR> groups;
    125124    /** Default VM settings */
     
    181180            {
    182181                Bstr tmpName;
    183                 CHECK_ERROR(machines[i], COMGETTER(Name)(tmpName.asOutParam()));
     182                rc = machines[i]->COMGETTER(Name)(tmpName.asOutParam());
    184183                if (SUCCEEDED(rc))
    185184                {
     
    333332        RTTestFailed(g_hTest, "%d: IVirtualBox::genericNetworkDrivers failed", __LINE__);
    334333
     334    return TRUE;
     335}
     336
     337
     338static BOOL tstApiClean(IVirtualBox *pVBox)
     339{
     340    HRESULT rc;
     341
    335342    /** Delete created VM and its files */
    336343    ComPtr<IMachine> machine;
     
    345352    return TRUE;
    346353}
    347 
    348354
    349355
     
    379385                /** Test IVirtualBox interface */
    380386                tstApiIVirtualBox(ptrVBox);
     387
     388
     389                /** Clean files/configs */
     390                tstApiClean(ptrVBox);
    381391            }
    382392        }
Note: See TracChangeset for help on using the changeset viewer.

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