Skip to content

Commit

Permalink
Add a space after control statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mortinger91 committed Oct 18, 2023
1 parent be8f37d commit e960d03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AlwaysBreakTemplateDeclarations: true
NamespaceIndentation: All
KeepEmptyLinesAtTheStartOfBlocks: true
AllowShortFunctionsOnASingleLine: Empty
SpaceBeforeParens: Never
SpaceBeforeParens: ControlStatements
# Only available in clang-format v16
# InsertNewlineAtEOF: true

Expand Down
8 changes: 4 additions & 4 deletions ProjectFolder/tests/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace test
assert(x.size() == y.size() &&
"assertVectorContentIsEqual failed: the vectors does not have "
"the same size!");
for(size_t i = 0; i < x.size(); i++)
for (size_t i = 0; i < x.size(); i++)
{
if(x[i] != y[i])
if (x[i] != y[i])
{
std::string errorString =
"vectors' elements at index: " + std::to_string(i) +
Expand All @@ -37,7 +37,7 @@ namespace test

#define ASSERT_THROW(condition) \
{ \
if(!(condition)) \
if (!(condition)) \
{ \
throw std::runtime_error( \
std::string(__FILE__) + std::string(":") + \
Expand All @@ -48,7 +48,7 @@ namespace test

#define ASSERT_EQUAL(x, y) \
{ \
if((x) != (y)) \
if ((x) != (y)) \
{ \
throw std::runtime_error( \
std::string(__FILE__) + std::string(":") + \
Expand Down

0 comments on commit e960d03

Please sign in to comment.