mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
[FEATURE] Adds the unit-test for case "NOLINT, NOLINTNEXTLINE works for };".
This commit is contained in:
parent
b7e2ef6de2
commit
a3c36d93d2
|
@ -521,6 +521,21 @@ class CpplintTest(CpplintTestBase):
|
|||
''],
|
||||
error_collector)
|
||||
self.assertEquals('', error_collector.Results())
|
||||
# NOLINT, NOLINTNEXTLINE silences the readability/braces warning for "};".
|
||||
error_collector = ErrorCollector(self.assert_)
|
||||
cpplint.ProcessFileData('test.cc', 'cc',
|
||||
['// Copyright 2014 Your Company.',
|
||||
'for (int i = 0; i != 100; ++i) {',
|
||||
'\tstd::cout << i << std::endl;',
|
||||
'}; // NOLINT',
|
||||
'for (int i = 0; i != 100; ++i) {',
|
||||
'\tstd::cout << i << std::endl;',
|
||||
'// NOLINTNEXTLINE',
|
||||
'};',
|
||||
'// LINT_KERNEL_FILE',
|
||||
''],
|
||||
error_collector)
|
||||
self.assertEquals('', error_collector.Results())
|
||||
|
||||
# Test Variable Declarations.
|
||||
def testVariableDeclarations(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user