Add testcase for Tokenizer::simplifyVarDecl.
A branch was not executed in coverity, but there was a testcase which needed it.
This commit is contained in:
parent
71150e987d
commit
4d38dd4f2c
|
@ -5172,9 +5172,12 @@ private:
|
|||
}
|
||||
|
||||
void vardecl16() {
|
||||
const char code[] = "const a::b<c,d(e),f>::g::h<i>::l *x [] = foo(),y [][] = bar();\n";
|
||||
const char code1[] = "const a::b<c,d(e),f>::g::h<i>::l *x [] = foo(),y [][] = bar();\n";
|
||||
ASSERT_EQUALS("const a :: b < c , d ( e ) , f > :: g :: h < i > :: l * x [ ] = foo ( ) ; "
|
||||
"const a :: b < c , d ( e ) , f > :: g :: h < i > :: l y [ ] [ ] = bar ( ) ;", tokenizeAndStringify(code));
|
||||
"const a :: b < c , d ( e ) , f > :: g :: h < i > :: l y [ ] [ ] = bar ( ) ;", tokenizeAndStringify(code1));
|
||||
const char code2[] = "const ::b<c,d(e),f>::g::h<i>::l *x [] = foo(),y [][] = bar();\n";
|
||||
ASSERT_EQUALS("const :: b < c , d ( e ) , f > :: g :: h < i > :: l * x [ ] = foo ( ) ; "
|
||||
"const :: b < c , d ( e ) , f > :: g :: h < i > :: l y [ ] [ ] = bar ( ) ;", tokenizeAndStringify(code2));
|
||||
}
|
||||
|
||||
void vardecl17() {
|
||||
|
|
Loading…
Reference in New Issue