VirtualBox

Changeset 19952 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 23, 2009 11:58:05 PM (16 years ago)
Author:
vboxsync
Message:

RTTest: More macros. Made RTTestFailure check for trailing new line to avoid getting an extra blank line.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/test.cpp

    r19944 r19952  
    993993        va_copy(va2, va);
    994994
     995        const char *pszEnd = strchr(pszFormat, '\0');
     996        bool fHasNewLine = pszFormat != pszEnd
     997                        && pszEnd[-1] == '\n';
     998
    995999        RTCritSectEnter(&pTest->OutputLock);
    996         cch += rtTestPrintf(pTest, "%N\n", pszFormat, &va2);
     1000        cch += rtTestPrintf(pTest, fHasNewLine ? "%N" : "%N\n", pszFormat, &va2);
    9971001        RTCritSectLeave(&pTest->OutputLock);
    9981002
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