VirtualBox

Ignore:
Timestamp:
May 27, 2009 4:43:08 PM (16 years ago)
Author:
vboxsync
Message:

IPRT: Rewrote RTPathTemp and added a testcase for it.

File:
1 edited

Legend:

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

    r19929 r20101  
    7878    if (RT_SUCCESS(rc))
    7979        RTTestIPrintf(RTTESTLVL_INFO, "UserHome={%s}\n", szPath);
     80
     81    RTTestSub(hTest, "RTPathTemp");
     82    RTTESTI_CHECK_RC(RTPathTemp(szPath, sizeof(szPath)), VINF_SUCCESS);
     83    if (RT_SUCCESS(rc))
     84        RTTestIPrintf(RTTESTLVL_INFO, "PathTemp={%s}\n", szPath);
     85    size_t cch = strlen(szPath);
     86    RTTESTI_CHECK_RC(RTPathTemp(szPath, cch), VERR_BUFFER_OVERFLOW);
     87    RTTESTI_CHECK_RC(RTPathTemp(szPath, cch+1), VINF_SUCCESS);
     88    RTTESTI_CHECK_RC(RTPathTemp(szPath, cch+2), VINF_SUCCESS);
     89
    8090
    8191    /*
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