Improve test coverage for va_end() called before va_start()
This commit is contained in:
parent
e4de220a2d
commit
2c040096ca
|
@ -184,6 +184,13 @@ private:
|
||||||
"}");
|
"}");
|
||||||
ASSERT_EQUALS("[test.cpp:5]: (error) va_list 'arg_ptr' used before va_start() was called.\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:5]: (error) va_list 'arg_ptr' used before va_start() was called.\n", errout.str());
|
||||||
|
|
||||||
|
check("void Format(char* szFormat, char (*szBuffer)[_Size], ...) {\n"
|
||||||
|
" va_list arg_ptr;\n"
|
||||||
|
" va_end(arg_ptr);\n"
|
||||||
|
"}");
|
||||||
|
ASSERT_EQUALS("[test.cpp:3]: (error) va_list 'arg_ptr' used before va_start() was called.\n", errout.str());
|
||||||
|
|
||||||
|
|
||||||
check("void Format(char* szFormat, char (*szBuffer)[_Size], ...) {\n"
|
check("void Format(char* szFormat, char (*szBuffer)[_Size], ...) {\n"
|
||||||
" va_list arg_ptr;\n"
|
" va_list arg_ptr;\n"
|
||||||
" va_start(arg_ptr, szBuffer);\n"
|
" va_start(arg_ptr, szBuffer);\n"
|
||||||
|
|
Loading…
Reference in New Issue