forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheck_orderfile_unittest.py
executable file
·31 lines (24 loc) · 1.05 KB
/
check_orderfile_unittest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env vpython
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import check_orderfile
import symbol_extractor
class TestCheckOrderFile(unittest.TestCase):
_SYMBOL_INFOS = [symbol_extractor.SymbolInfo('first', 0x1, 0, ''),
symbol_extractor.SymbolInfo('second', 0x2, 0, ''),
symbol_extractor.SymbolInfo('notProfiled', 0x4, 0, ''),
symbol_extractor.SymbolInfo('third', 0x3, 0, ''),]
def testVerifySymbolOrder(self):
self.assertTrue(check_orderfile._VerifySymbolOrder(
['.second', 'first', 'eighth', 'third'],
self._SYMBOL_INFOS, 0))
self.assertFalse(check_orderfile._VerifySymbolOrder(
['second', 'first', 'eighth', 'third'],
self._SYMBOL_INFOS, 0))
self.assertTrue(check_orderfile._VerifySymbolOrder(
['second', 'first', 'eighth', 'third'],
self._SYMBOL_INFOS, 1))
if __name__ == '__main__':
unittest.main()