MCPcopy Create free account
hub / github.com/cpplint/cpplint / testControlClauseWithoutParensNewline

Method testControlClauseWithoutParensNewline

cpplint_unittest.py:4667–4674  ·  view source on GitHub ↗
(self, keyword)

Source from the content-addressed store, hash-verified

4665
4666 @pytest.mark.parametrize("keyword", ["else", "do", "try"])
4667 def testControlClauseWithoutParensNewline(self, keyword):
4668 # The % 2 part is pseudorandom whitespace-support testing
4669 self.TestLintContains(
4670 f"{keyword}{['', ' '][len(keyword) % 2]}{{"
4671 f"{[' ', ''][len(keyword) % 2]}do_something(); }}",
4672 f"Controlled statements inside brackets of {keyword} clause"
4673 f" should be on a separate line [whitespace/newline] [5]",
4674 )
4675
4676 def testControlClauseNewlineNameFalsePositives(self):
4677 self.TestLint(" else if_condition_do_something();", "")

Callers

nothing calls this directly

Calls 1

TestLintContainsMethod · 0.80

Tested by

no test coverage detected