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 940c874001e768f3de3d20fd57237593a9ced845..16a5909b641e4170028a9e8e8a68fde0d2408d33 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): |
@@ -25,6 +26,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): |