forked from myint/cppclean
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This can't be tested at the system level on case-sensitive file systems.
- Loading branch information
Showing
2 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python | ||
|
||
"""Tests for find_warnings module.""" | ||
|
||
from __future__ import absolute_import | ||
|
||
import unittest | ||
|
||
from cpp import find_warnings | ||
|
||
|
||
class Tests(unittest.TestCase): | ||
|
||
def test_get_correct_include_filename(self): | ||
self.assertEqual( | ||
'FOO.h', | ||
find_warnings.get_correct_include_filename( | ||
'foo.h', | ||
['FOO.h', 'apple.h'])) | ||
|
||
def test_get_correct_include_filename_without_match(self): | ||
self.assertEqual( | ||
None, | ||
find_warnings.get_correct_include_filename( | ||
'foo.h', | ||
['f.h', 'apple.h'])) | ||
|
||
self.assertEqual( | ||
None, | ||
find_warnings.get_correct_include_filename( | ||
'foo.h', | ||
[])) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |