1# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import unittest
6
7from mojom_bindings_generator import MakeImportStackMessage
8
9
10class MojoBindingsGeneratorTest(unittest.TestCase):
11  """Tests mojo_bindings_generator."""
12
13  def testMakeImportStackMessage(self):
14    """Tests MakeImportStackMessage()."""
15    self.assertEquals(MakeImportStackMessage(["x"]), "")
16    self.assertEquals(MakeImportStackMessage(["x", "y"]),
17        "\n  y was imported by x")
18    self.assertEquals(MakeImportStackMessage(["x", "y", "z"]),
19        "\n  z was imported by y\n  y was imported by x")
20
21
22if __name__ == "__main__":
23  unittest.main()
24