MCPcopy Create free account
hub / github.com/defold/defold / TEST

Function TEST

engine/dlib/src/test/test_dstrings.cpp:23–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include "dlib/dstrings.h"
22
23TEST(dmStrings, dmSnprintfEmpty)
24{
25 int res;
26 char buffer[1];
27#if !defined(__linux__) // The newer Gcc has a more strict printf checking (zero length format string)
28 res = dmSnPrintf(0x0, 0, "");
29 ASSERT_EQ(-1, res);
30 res = dmSnPrintf(buffer, 1, "");
31 ASSERT_EQ(0, res);
32#endif
33 res = dmSnPrintf(buffer, 1, 0x0);
34 ASSERT_EQ(-1, res);
35}
36
37TEST(dmStrings, dmSnprintf)
38{

Callers

nothing calls this directly

Calls 7

dmSnPrintfFunction · 0.85
dmStrTokFunction · 0.85
freeFunction · 0.85
dmStrlCpyFunction · 0.85
dmStrlCatFunction · 0.85
dmStrCaseCmpFunction · 0.85
dmStrErrorFunction · 0.85

Tested by

no test coverage detected