Skip to content

Commit d333d55

Browse files
Sidelobetkruse
authored andcommitted
Added unit test for size_t C-Style cast check
1 parent 481adab commit d333d55

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cpplint_unittest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,10 @@ def testCStyleCast(self):
632632
'uint64 a = (uint64)1.0;',
633633
'Using C-style cast. Use static_cast<uint64>(...) instead'
634634
' [readability/casting] [4]')
635+
self.TestLint(
636+
'size_t a = (size_t)1.0;',
637+
'Using C-style cast. Use static_cast<size_t>(...) instead'
638+
' [readability/casting] [4]')
635639

636640
# These shouldn't be recognized casts.
637641
self.TestLint('u a = (u)NULL;', '')

0 commit comments

Comments
 (0)