MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / TestStrCopy

Function TestStrCopy

src/External/CascLib/test/TLogHelper.cpp:62–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62void TestStrCopy(char * szTarget, size_t cchTarget, const char * szSource, size_t cchSource = -1)
63{
64 size_t cchToCopy;
65
66 if(cchTarget > 0)
67 {
68 // Make sure we know the length
69 if(cchSource == -1)
70 cchSource = strlen(szSource);
71 cchToCopy = TEST_MIN((cchTarget - 1), cchSource);
72
73 // Copy the string
74 memcpy(szTarget, szSource, cchToCopy);
75 szTarget[cchToCopy] = 0;
76 }
77}
78
79void TestStrCopy(char * szTarget, size_t cchTarget, const wchar_t * szSource, size_t cchSource = -1)
80{

Callers 4

CopyFormatCharacterFunction · 0.85
TLogHelperMethod · 0.85
PrintWithClreolMethod · 0.85
PrintVerdictMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected