parent
032d2e5cd1
commit
497b3c38e2
|
@ -365,34 +365,34 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void function_method() const {
|
void function_method() const {
|
||||||
const char xmldata[] = "<?xml version=\"1.0\"?>\n"
|
const char xmldata[] = "<?xml version=\"1.0\"?>\n"
|
||||||
"<def>\n"
|
"<def>\n"
|
||||||
" <function name=\"CString::Format\">\n"
|
" <function name=\"CString::Format\">\n"
|
||||||
" <noreturn>false</noreturn>\n"
|
" <noreturn>false</noreturn>\n"
|
||||||
" </function>\n"
|
" </function>\n"
|
||||||
"</def>";
|
"</def>";
|
||||||
|
|
||||||
Library library;
|
Library library;
|
||||||
readLibrary(library, xmldata);
|
readLibrary(library, xmldata);
|
||||||
ASSERT(library.use.empty());
|
ASSERT(library.use.empty());
|
||||||
ASSERT(library.leakignore.empty());
|
ASSERT(library.leakignore.empty());
|
||||||
ASSERT(library.argumentChecks.empty());
|
ASSERT(library.argumentChecks.empty());
|
||||||
|
|
||||||
{
|
{
|
||||||
Settings settings;
|
Settings settings;
|
||||||
Tokenizer tokenizer(&settings, nullptr);
|
Tokenizer tokenizer(&settings, nullptr);
|
||||||
std::istringstream istr("CString str; str.Format();");
|
std::istringstream istr("CString str; str.Format();");
|
||||||
tokenizer.tokenize(istr, "test.cpp");
|
tokenizer.tokenize(istr, "test.cpp");
|
||||||
ASSERT(library.isnotnoreturn(Token::findsimplematch(tokenizer.tokens(), "Format")));
|
ASSERT(library.isnotnoreturn(Token::findsimplematch(tokenizer.tokens(), "Format")));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
Settings settings;
|
Settings settings;
|
||||||
Tokenizer tokenizer(&settings, nullptr);
|
Tokenizer tokenizer(&settings, nullptr);
|
||||||
std::istringstream istr("HardDrive hd; hd.Format();");
|
std::istringstream istr("HardDrive hd; hd.Format();");
|
||||||
tokenizer.tokenize(istr, "test.cpp");
|
tokenizer.tokenize(istr, "test.cpp");
|
||||||
ASSERT(!library.isnotnoreturn(Token::findsimplematch(tokenizer.tokens(), "Format")));
|
ASSERT(!library.isnotnoreturn(Token::findsimplematch(tokenizer.tokens(), "Format")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void function_warn() const {
|
void function_warn() const {
|
||||||
|
|
Loading…
Reference in New Issue