Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # -*- coding: utf-8; -*- 1 # -*- coding: utf-8; -*-
2 # 2 #
3 # Copyright (C) 2011 Google Inc. All rights reserved. 3 # Copyright (C) 2011 Google Inc. All rights reserved.
4 # Copyright (C) 2009 Torch Mobile Inc. 4 # Copyright (C) 2009 Torch Mobile Inc.
5 # Copyright (C) 2009 Apple Inc. All rights reserved. 5 # Copyright (C) 2009 Apple Inc. All rights reserved.
6 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) 6 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
7 # 7 #
8 # Redistribution and use in source and binary forms, with or without 8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions are 9 # modification, are permitted provided that the following conditions are
10 # met: 10 # met:
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 1573
1574 def test_check_deprecated_macros(self): 1574 def test_check_deprecated_macros(self):
1575 self.assert_lint('ASSERT(foo)', 'ASSERT is deprecated. Use DCHECK or ' 1575 self.assert_lint('ASSERT(foo)', 'ASSERT is deprecated. Use DCHECK or '
1576 'its variants instead. [build/deprecated] [5]') 1576 'its variants instead. [build/deprecated] [5]')
1577 self.assert_lint(' ASSERT_UNUSED(foo, foo)', 'ASSERT_UNUSED is ' 1577 self.assert_lint(' ASSERT_UNUSED(foo, foo)', 'ASSERT_UNUSED is '
1578 'deprecated. Use DCHECK or its variants instead. ' 1578 'deprecated. Use DCHECK or its variants instead. '
1579 '[build/deprecated] [5]') 1579 '[build/deprecated] [5]')
1580 self.assert_lint('ASSERT_NOT_REACHED()', 'ASSERT_NOT_REACHED is ' 1580 self.assert_lint('ASSERT_NOT_REACHED()', 'ASSERT_NOT_REACHED is '
1581 'deprecated. Use NOTREACHED instead. ' 1581 'deprecated. Use NOTREACHED instead. '
1582 '[build/deprecated] [5]') 1582 '[build/deprecated] [5]')
1583 self.assert_lint('ASSERT_WITH_SECURITY_IMPLICATION(foo)',
1584 'ASSERT_WITH_SECURITY_IMPLICATION is deprecated. Use '
1585 'SECURITY_DCHECK instead. [build/deprecated] [5]')
1586 self.assert_lint('WTF_LOG(foo)', 'WTF_LOG is deprecated. Use DVLOG ' 1583 self.assert_lint('WTF_LOG(foo)', 'WTF_LOG is deprecated. Use DVLOG '
1587 'instead. [build/deprecated] [5]') 1584 'instead. [build/deprecated] [5]')
1588 1585
1589 self.assert_lint('FOO_BAR_ASSERT()', '') 1586 self.assert_lint('FOO_BAR_ASSERT()', '')
1590 self.assert_lint('ASSERT_NO_EXCEPTIONS', '') 1587 self.assert_lint('ASSERT_NO_EXCEPTIONS', '')
1591 1588
1592 def test_spacing_before_last_semicolon(self): 1589 def test_spacing_before_last_semicolon(self):
1593 self.assert_lint('default:;', 1590 self.assert_lint('default:;',
1594 'Semicolon defining empty statement. Use { } instead.' 1591 'Semicolon defining empty statement. Use { } instead.'
1595 ' [whitespace/semicolon] [5]') 1592 ' [whitespace/semicolon] [5]')
(...skipping 2663 matching lines...) Expand 10 before | Expand all | Expand 10 after
4259 def test_ne(self): 4256 def test_ne(self):
4260 """Test __ne__ inequality function.""" 4257 """Test __ne__ inequality function."""
4261 checker1 = self._checker() 4258 checker1 = self._checker()
4262 checker2 = self._checker() 4259 checker2 = self._checker()
4263 4260
4264 # != calls __ne__. 4261 # != calls __ne__.
4265 # By default, __ne__ always returns true on different objects. 4262 # By default, __ne__ always returns true on different objects.
4266 # Thus, just check the distinguishing case to verify that the 4263 # Thus, just check the distinguishing case to verify that the
4267 # code defines __ne__. 4264 # code defines __ne__.
4268 self.assertFalse(checker1 != checker2) 4265 self.assertFalse(checker1 != checker2)
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/cpp.py ('k') | third_party/WebKit/public/web/WebNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698