MCPcopy Index your code
hub / github.com/cpplint/cpplint / testSpacingAfterAlternateToken

Method testSpacingAfterAlternateToken

cpplint_unittest.py:3019–3032  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3017 )
3018
3019 def testSpacingAfterAlternateToken(self):
3020 try:
3021 cpplint._cpplint_state.AddFilters("-readability/alt_tokens")
3022 self.TestLint("if (foo or (bar) or foobar) {", "")
3023 self.TestLint("if (foo or (bar)) {", "")
3024 self.TestLint("if ((foo) or (bar)) {", "")
3025 self.TestLint("if (not foo) {", "")
3026 self.TestLint("if (not (foo)) {", "")
3027 self.TestLint("if (not(foo)) {", "")
3028 self.TestLint(
3029 "if ((foo)or(bar)) {", "Missing spaces around || [whitespace/operators] [3]"
3030 )
3031 finally:
3032 cpplint._cpplint_state.SetFilters("")
3033
3034 def testSpacingBeforeBraces(self):
3035 self.TestLint("if (foo){", "Missing space before { [whitespace/braces] [5]")

Callers

nothing calls this directly

Calls 3

AddFiltersMethod · 0.80
TestLintMethod · 0.80
SetFiltersMethod · 0.80

Tested by

no test coverage detected