| Index: mojo/python/tests/bindings_enums_unittest.py
|
| diff --git a/mojo/python/tests/bindings_enums_unittest.py b/mojo/python/tests/bindings_enums_unittest.py
|
| index bcf21f0a06eb9530e4faf13013fdd5d034af1668..08163ab7bcc611afd9feeb3ef5fb2cbef04150a3 100644
|
| --- a/mojo/python/tests/bindings_enums_unittest.py
|
| +++ b/mojo/python/tests/bindings_enums_unittest.py
|
| @@ -7,6 +7,7 @@ import unittest
|
| # Generated files
|
| # pylint: disable=F0401
|
| import sample_import_mojom
|
| +import sample_service_mojom
|
|
|
|
|
| class EnumBindingsTest(unittest.TestCase):
|
| @@ -27,6 +28,13 @@ class EnumBindingsTest(unittest.TestCase):
|
| self.assertEquals(sample_import_mojom.YetAnotherShape.CIRCLE, 21)
|
| self.assertEquals(sample_import_mojom.YetAnotherShape.TRIANGLE, 22)
|
|
|
| + # Testing that internal enum class have expected constant values.
|
| + def testInternalEnumGeneration(self):
|
| + self.assertEquals(sample_service_mojom.Bar.Type.VERTICAL, 1)
|
| + self.assertEquals(sample_service_mojom.Bar.Type.HORIZONTAL, 2)
|
| + self.assertEquals(sample_service_mojom.Bar.Type.BOTH, 3)
|
| + self.assertEquals(sample_service_mojom.Bar.Type.INVALID, 4)
|
| +
|
| # Testing an enum class cannot be instantiated.
|
| def testNonInstantiableEnum(self):
|
| with self.assertRaises(TypeError):
|
|
|