Skip to content

Commit 6c8669e

Browse files
committed
Fix test regression from 9883c51.
1 parent 0c1c7f1 commit 6c8669e

File tree

1 file changed

+0
-68
lines changed

1 file changed

+0
-68
lines changed

cpplint/cpplint_unittest.py

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,74 +1972,6 @@ def testDisallowMacrosAtEnd(self):
19721972
error_collector)
19731973
self.assertEquals('', error_collector.Results())
19741974

1975-
# DISALLOW* macros should be in the private: section.
1976-
def testMisplacedDisallowMacros(self):
1977-
for macro_name in (
1978-
'DISALLOW_COPY_AND_ASSIGN',
1979-
'DISALLOW_IMPLICIT_CONSTRUCTORS'):
1980-
self.TestMultiLineLint(
1981-
"""
1982-
class A {'
1983-
public:
1984-
%s(A);
1985-
};""" % macro_name,
1986-
('%s must be in the private: section' % macro_name) +
1987-
' [readability/constructors] [3]')
1988-
1989-
self.TestMultiLineLint(
1990-
"""
1991-
struct B {'
1992-
%s(B);
1993-
};""" % macro_name,
1994-
('%s must be in the private: section' % macro_name) +
1995-
' [readability/constructors] [3]')
1996-
1997-
self.TestMultiLineLint(
1998-
"""
1999-
class Outer1 {'
2000-
private:
2001-
struct Inner1 {
2002-
%s(Inner1);
2003-
};
2004-
%s(Outer1);
2005-
};""" % (macro_name, macro_name),
2006-
('%s must be in the private: section' % macro_name) +
2007-
' [readability/constructors] [3]')
2008-
2009-
self.TestMultiLineLint(
2010-
"""
2011-
class Outer2 {'
2012-
private:
2013-
class Inner2 {
2014-
%s(Inner2);
2015-
};
2016-
%s(Outer2);
2017-
};""" % (macro_name, macro_name),
2018-
'')
2019-
# Extra checks to make sure that nested classes are handled
2020-
# correctly. Use different macros for inner and outer classes so
2021-
# that we can tell the error messages apart.
2022-
self.TestMultiLineLint(
2023-
"""
2024-
class Outer3 {
2025-
struct Inner3 {
2026-
DISALLOW_COPY_AND_ASSIGN(Inner3);
2027-
};
2028-
DISALLOW_IMPLICIT_CONSTRUCTORS(Outer3);
2029-
};""",
2030-
('DISALLOW_COPY_AND_ASSIGN must be in the private: section'
2031-
' [readability/constructors] [3]'))
2032-
self.TestMultiLineLint(
2033-
"""
2034-
struct Outer4 {
2035-
class Inner4 {
2036-
DISALLOW_COPY_AND_ASSIGN(Inner4);
2037-
};
2038-
DISALLOW_IMPLICIT_CONSTRUCTORS(Outer4);
2039-
};""",
2040-
('DISALLOW_IMPLICIT_CONSTRUCTORS must be in the private: section'
2041-
' [readability/constructors] [3]'))
2042-
20431975
# Brace usage
20441976
def testBraces(self):
20451977
# Braces shouldn't be followed by a ; unless they're defining a struct

0 commit comments

Comments
 (0)