run astyle

[ci-skip]
This commit is contained in:
Matthias Krüger 2017-01-31 16:22:31 +01:00
parent 92d9e810f3
commit f80e888b7e
3 changed files with 14 additions and 14 deletions

View File

@ -6408,15 +6408,15 @@ private:
"[test.cpp:11] -> [test.cpp:16]: (warning) Function 'func4' argument order different: declaration ', b, c' definition 'c, b, a'\n", errout.str());
}
// #7846 - Syntax error when using C++11 braced-initializer in default argument
// #7846 - Syntax error when using C++11 braced-initializer in default argument
void cpp11FunctionArgInit() {
// syntax error is not expected
ASSERT_NO_THROW(check(
"\n void foo(int declaration = {}) {"
"\n for (int i = 0; i < 10; i++) {}"
"\n }"
"\n "
));
"\n void foo(int declaration = {}) {"
"\n for (int i = 0; i < 10; i++) {}"
"\n }"
"\n "
));
ASSERT_EQUALS("", errout.str());
}
};

View File

@ -2888,10 +2888,10 @@ private:
" delete [] *dataPtr;\n"
"}";
const char exp[] = "int main ( ) {\n"
"char * data ; data = new char [ 100 ] ;\n"
"char * * dataPtr ; dataPtr = & data ;\n"
"printf ( \"test\" ) ;\n"
"delete [ ] data ;\n"
"char * data ; data = new char [ 100 ] ;\n"
"char * * dataPtr ; dataPtr = & data ;\n"
"printf ( \"test\" ) ;\n"
"delete [ ] data ;\n"
"}";
ASSERT_EQUALS(exp, tokenizeAndStringify(code, /*simplify=*/true));
}

View File

@ -4105,10 +4105,10 @@ private:
void bracesInitCpp11() {
functionVariableUsage(
"int fun() {\n"
" static int fpUnread{0};\n"
" const int var{fpUnread++};\n"
" return var;\n"
"int fun() {\n"
" static int fpUnread{0};\n"
" const int var{fpUnread++};\n"
" return var;\n"
"}\n"
);
ASSERT_EQUALS("", errout.str());