mojo/public/tools/mojom/enum_unittest.py
def testImportedConstantReference(self):
    """Verifies that an enum value can be assigned from the value of an integral
    constant within an imported module."""
    a_mojom = 'a.mojom'
    self.WriteFile(a_mojom, 'module a; const int32 kFoo = 37;')
    b_mojom = 'b.mojom'
    self.WriteFile(b_mojom,
                   'module b; import "a.mojom"; enum F { kFoo = a.kFoo };')
    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(37, b.enums[0].fields[0].numeric_value)
Verifies that an enum value can be assigned from the value of an integral
    constant within an imported module.
Verifies that an enum value can be assigned from the value of an integral
constant within an imported module.
Verifies that an enum value can be assigned from the value of an integral constant within an imported module .
def testImportedConstantReference(self):
    a_mojom = 'a.mojom'
    self.WriteFile(a_mojom, 'module a; const int32 kFoo = 37;')
    b_mojom = 'b.mojom'
    self.WriteFile(b_mojom,
                   'module b; import "a.mojom"; enum F { kFoo = a.kFoo };')
    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(37, b.enums[0].fields[0].numeric_value)
def testImportedConstantReference ( self ) : a_mojom = 'a.mojom' self . WriteFile ( a_mojom , 'module a; const int32 kFoo = 37;' ) b_mojom = 'b.mojom' self . WriteFile ( b_mojom , 'module b; import "a.mojom"; enum F { kFoo = a.kFoo };' ) 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 ( 37 , b . enums [ 0 ] . fields [ 0 ] . numeric_value )
Verifies that an enum value can be assigned from the value of an integral
constant within an imported module.
Verifies that an enum value can be assigned from the value of an integral constant within an imported module .
"""Verifies that an enum value can be assigned from the value of an integral
    constant within an imported module."""
self