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

Method testBlankLinesCheck

cpplint_unittest.py:3726–3737  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3724 assert not cpplint.IsBlankLine("{")
3725
3726 def testBlankLinesCheck(self):
3727 self.TestBlankLinesCheck(["{\n", "\n", "\n", "}\n"], 1, 1)
3728 self.TestBlankLinesCheck([" if (foo) {\n", "\n", " }\n"], 1, 1)
3729 self.TestBlankLinesCheck(["\n", "// {\n", "\n", "\n", "// Comment\n", "{\n", "}\n"], 0, 0)
3730 self.TestBlankLinesCheck(["\n", 'run("{");\n', "\n"], 0, 0)
3731 self.TestBlankLinesCheck(["\n", " if (foo) { return 0; }\n", "\n"], 0, 0)
3732 self.TestBlankLinesCheck(["int x(\n", " int a) {\n", "\n", "return 0;\n", "}"], 0, 0)
3733 self.TestBlankLinesCheck(
3734 ["int x(\n", " int a) const {\n", "\n", "return 0;\n", "}"], 0, 0
3735 )
3736 self.TestBlankLinesCheck(["int x(\n", " int a) {\n", "\n", "return 0;\n", "}"], 1, 0)
3737 self.TestBlankLinesCheck(["int x(\n", " int a) {\n", "\n", "return 0;\n", "}"], 1, 0)
3738
3739 def testAllowBlankLineBeforeClosingNamespace(self):
3740 error_collector = ErrorCollector(self.assertTrue)

Callers

nothing calls this directly

Calls 1

TestBlankLinesCheckMethod · 0.80

Tested by

no test coverage detected