blob: 9020b528923d6cfb0e5ad23d66a7b6c28b522ec2 [file] [log] [blame]
Egor Pasko0462e852d2018-03-29 15:52:091#!/usr/bin/env vpython
lizeb467e5ba2015-02-02 16:35:362# Copyright 2015 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.
5
6import unittest
7
8import check_orderfile
9import symbol_extractor
10
11
12class TestCheckOrderFile(unittest.TestCase):
13 _SYMBOL_INFOS = [symbol_extractor.SymbolInfo('first', 0x1, 0, ''),
14 symbol_extractor.SymbolInfo('second', 0x2, 0, ''),
15 symbol_extractor.SymbolInfo('notProfiled', 0x4, 0, ''),
16 symbol_extractor.SymbolInfo('third', 0x3, 0, ''),]
17
Matthew Cary14195b42018-08-10 14:59:5718 def testVerifySymbolOrder(self):
19 self.assertTrue(check_orderfile._VerifySymbolOrder(
20 ['.second', 'first', 'eighth', 'third'],
Matthew Carybdba7072018-08-11 01:09:0121 self._SYMBOL_INFOS, 0))
Matthew Cary14195b42018-08-10 14:59:5722 self.assertFalse(check_orderfile._VerifySymbolOrder(
23 ['second', 'first', 'eighth', 'third'],
Matthew Carybdba7072018-08-11 01:09:0124 self._SYMBOL_INFOS, 0))
25 self.assertTrue(check_orderfile._VerifySymbolOrder(
26 ['second', 'first', 'eighth', 'third'],
27 self._SYMBOL_INFOS, 1))
Matthew Cary14195b42018-08-10 14:59:5728
lizeb467e5ba2015-02-02 16:35:3629
30if __name__ == '__main__':
31 unittest.main()