mojo/public/tools/mojom/enum_unittest.py
def testImportedEnumReference(self):
    """Verifies that an enum value can be assigned from the value of a field
    in another enum within a different module."""
    a_mojom = 'a.mojom'
    self.WriteFile(a_mojom, 'module a; enum E { kFoo=42, kBar };')
    b_mojom = 'b.mojom'
    self.WriteFile(b_mojom,
                   'module b; import "a.mojom"; enum F { kFoo = a.E.kBar };')
    self.ParseMojoms([a_mojom, b_mojom])
    b = self.LoadModule(b_mojom)

    self.assertEqual('F', b.enums[0].mojom_name)
    self.assertEqual('kFoo', b.enums[0].fields[0].mojom_name)
    self.assertEqual(43, b.enums[0].fields[0].numeric_value)
Verifies that an enum value can be assigned from the value of a field
    in another enum within a different module.
Verifies that an enum value can be assigned from the value of a field
in another enum within a different module.
Verifies that an enum value can be assigned from the value of a field in another enum within a different module .
def testImportedEnumReference(self):
    a_mojom = 'a.mojom'
    self.WriteFile(a_mojom, 'module a; enum E { kFoo=42, kBar };')
    b_mojom = 'b.mojom'
    self.WriteFile(b_mojom,
                   'module b; import "a.mojom"; enum F { kFoo = a.E.kBar };')
    self.ParseMojoms([a_mojom, b_mojom])
    b = self.LoadModule(b_mojom)
    self.assertEqual('F', b.enums[0].mojom_name)
    self.assertEqual('kFoo', b.enums[0].fields[0].mojom_name)
    self.assertEqual(43, b.enums[0].fields[0].numeric_value)
def testImportedEnumReference ( self ) : a_mojom = 'a.mojom' self . WriteFile ( a_mojom , 'module a; enum E { kFoo=42, kBar };' ) b_mojom = 'b.mojom' self . WriteFile ( b_mojom , 'module b; import "a.mojom"; enum F { kFoo = a.E.kBar };' ) self . ParseMojoms ( [ a_mojom , b_mojom ] ) b = self . LoadModule ( b_mojom ) self . assertEqual ( 'F' , b . enums [ 0 ] . mojom_name ) self . assertEqual ( 'kFoo' , b . enums [ 0 ] . fields [ 0 ] . mojom_name ) self . assertEqual ( 43 , b . enums [ 0 ] . fields [ 0 ] . numeric_value )
Verifies that an enum value can be assigned from the value of a field
in another enum within a different module.
Verifies that an enum value can be assigned from the value of a field in another enum within a different module .
"""Verifies that an enum value can be assigned from the value of a field
    in another enum within a different module."""
self