mojo/public/tools/mojom/enum_unittest.py
def testSameEnumReference(self):
    """Verifies that an enum value can be assigned from the value of another
    field within the same enum."""
    types = self.ExtractTypes('enum E { kA, kB, kFirst=kA };')
    self.assertEqual('kA', types['E'].fields[0].mojom_name)
    self.assertEqual(0, types['E'].fields[0].numeric_value)
    self.assertEqual('kB', types['E'].fields[1].mojom_name)
    self.assertEqual(1, types['E'].fields[1].numeric_value)
    self.assertEqual('kFirst', types['E'].fields[2].mojom_name)
    self.assertEqual(0, types['E'].fields[2].numeric_value)
Verifies that an enum value can be assigned from the value of another
    field within the same enum.
Verifies that an enum value can be assigned from the value of another
field within the same enum.
Verifies that an enum value can be assigned from the value of another field within the same enum .
def testSameEnumReference(self):
    types = self.ExtractTypes('enum E { kA, kB, kFirst=kA };')
    self.assertEqual('kA', types['E'].fields[0].mojom_name)
    self.assertEqual(0, types['E'].fields[0].numeric_value)
    self.assertEqual('kB', types['E'].fields[1].mojom_name)
    self.assertEqual(1, types['E'].fields[1].numeric_value)
    self.assertEqual('kFirst', types['E'].fields[2].mojom_name)
    self.assertEqual(0, types['E'].fields[2].numeric_value)
def testSameEnumReference ( self ) : types = self . ExtractTypes ( 'enum E { kA, kB, kFirst=kA };' ) self . assertEqual ( 'kA' , types [ 'E' ] . fields [ 0 ] . mojom_name ) self . assertEqual ( 0 , types [ 'E' ] . fields [ 0 ] . numeric_value ) self . assertEqual ( 'kB' , types [ 'E' ] . fields [ 1 ] . mojom_name ) self . assertEqual ( 1 , types [ 'E' ] . fields [ 1 ] . numeric_value ) self . assertEqual ( 'kFirst' , types [ 'E' ] . fields [ 2 ] . mojom_name ) self . assertEqual ( 0 , types [ 'E' ] . fields [ 2 ] . numeric_value )
Verifies that an enum value can be assigned from the value of another
field within the same enum.
Verifies that an enum value can be assigned from the value of another field within the same enum .
"""Verifies that an enum value can be assigned from the value of another
    field within the same enum."""
self