Support for unpacked ARM packed relocations.
[chromium-blink-merge.git] / components / tools / metrics / count_ifdefs_unittest.py
blob9b8c3229a0f625b6eb0d3bd2b49982cb93d4e74a
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
6 """Tests for count_ifdefs.
7 """
9 import os
10 import unittest
12 import count_ifdefs
15 class CountIfdefsTest(unittest.TestCase):
17 def setUp(self):
18 self.root = os.path.join(os.path.dirname(__file__), 'testdata')
20 def testNormal(self):
21 count = count_ifdefs.CountIfdefs('OS_[A-Z]+', self.root)
22 self.failUnless(count == 6)
24 def testSkipTests(self):
25 count = count_ifdefs.CountIfdefs('OS_[A-Z]+', self.root, True)
26 self.failUnless(count == 4)
29 if __name__ == '__main__':
30 unittest.main()