Fix invalid assertion from recent commit. Make single argument givenACodeSampleToTokenize ctor explicit.
This commit is contained in:
parent
4163f1e122
commit
1c191845fb
|
@ -2359,8 +2359,7 @@ private:
|
||||||
" addtoken(&rettail, tok);\n"
|
" addtoken(&rettail, tok);\n"
|
||||||
"}");
|
"}");
|
||||||
const Token *f = Token::findsimplematch(tokenizer.tokens(), "void addtoken ( Token * *");
|
const Token *f = Token::findsimplematch(tokenizer.tokens(), "void addtoken ( Token * *");
|
||||||
ASSERT_EQUALS(true, db && f);
|
ASSERT_EQUALS(true, db && f && !f->function()); // regression value only
|
||||||
ASSERT_EQUALS(true, db && f && f->function());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ private:
|
||||||
Tokenizer _tokenizer;
|
Tokenizer _tokenizer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
givenACodeSampleToTokenize(const char sample[], bool createOnly = false, bool cpp = true)
|
explicit givenACodeSampleToTokenize(const char sample[], bool createOnly = false, bool cpp = true)
|
||||||
: _tokenizer(&_settings, 0) {
|
: _tokenizer(&_settings, 0) {
|
||||||
std::istringstream iss(sample);
|
std::istringstream iss(sample);
|
||||||
if (createOnly)
|
if (createOnly)
|
||||||
|
|
Loading…
Reference in New Issue