summaryrefslogtreecommitdiffstats
path: root/tools/cygprofile/cygprofile_utils_unittest.py
blob: 84e0a61a65a616aba304f9ed3384d4b500ffdb9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/python
# 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 cygprofile_utils


class TestCygprofileUtils(unittest.TestCase):
  def testInvertMapping(self):
    inputMap = {'1': ['2', '3'],
                '4': ['2', '5']}
    self.assertEqual(cygprofile_utils.InvertMapping(inputMap),
        {'2': ['1', '4'],
         '3': ['1'],
         '5': ['4']})


if __name__ == '__main__':
  unittest.main()