| OLD | NEW |
| 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 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 def test_spacing_before_braces(self): | 1702 def test_spacing_before_braces(self): |
| 1703 self.assert_lint('if (foo){', 'Missing space before {' | 1703 self.assert_lint('if (foo){', 'Missing space before {' |
| 1704 ' [whitespace/braces] [5]') | 1704 ' [whitespace/braces] [5]') |
| 1705 self.assert_lint('for{', 'Missing space before {' | 1705 self.assert_lint('for{', 'Missing space before {' |
| 1706 ' [whitespace/braces] [5]') | 1706 ' [whitespace/braces] [5]') |
| 1707 self.assert_lint('for {', '') | 1707 self.assert_lint('for {', '') |
| 1708 self.assert_lint('EXPECT_DEBUG_DEATH({', '') | 1708 self.assert_lint('EXPECT_DEBUG_DEATH({', '') |
| 1709 | 1709 |
| 1710 def test_spacing_between_braces(self): | 1710 def test_spacing_between_braces(self): |
| 1711 self.assert_lint(' { }', '') | 1711 self.assert_lint(' { }', '') |
| 1712 self.assert_lint(' {}', 'Missing space inside { }. [whitespace/brace
s] [5]') | 1712 self.assert_lint(' {}', '') |
| 1713 self.assert_lint(' { }', 'Too many spaces inside { }. [whitespace/
braces] [5]') | 1713 self.assert_lint(' { }', 'Too many spaces inside { }. [whitespace/
braces] [5]') |
| 1714 | 1714 |
| 1715 def test_spacing_around_else(self): | 1715 def test_spacing_around_else(self): |
| 1716 self.assert_lint('}else {', 'Missing space before else' | 1716 self.assert_lint('}else {', 'Missing space before else' |
| 1717 ' [whitespace/braces] [5]') | 1717 ' [whitespace/braces] [5]') |
| 1718 self.assert_lint('} else{', 'Missing space before {' | 1718 self.assert_lint('} else{', 'Missing space before {' |
| 1719 ' [whitespace/braces] [5]') | 1719 ' [whitespace/braces] [5]') |
| 1720 self.assert_lint('} else {', '') | 1720 self.assert_lint('} else {', '') |
| 1721 self.assert_lint('} else if', '') | 1721 self.assert_lint('} else if', '') |
| 1722 | 1722 |
| (...skipping 3496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5219 def test_ne(self): | 5219 def test_ne(self): |
| 5220 """Test __ne__ inequality function.""" | 5220 """Test __ne__ inequality function.""" |
| 5221 checker1 = self._checker() | 5221 checker1 = self._checker() |
| 5222 checker2 = self._checker() | 5222 checker2 = self._checker() |
| 5223 | 5223 |
| 5224 # != calls __ne__. | 5224 # != calls __ne__. |
| 5225 # By default, __ne__ always returns true on different objects. | 5225 # By default, __ne__ always returns true on different objects. |
| 5226 # Thus, just check the distinguishing case to verify that the | 5226 # Thus, just check the distinguishing case to verify that the |
| 5227 # code defines __ne__. | 5227 # code defines __ne__. |
| 5228 self.assertFalse(checker1 != checker2) | 5228 self.assertFalse(checker1 != checker2) |
| OLD | NEW |