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