mojo/public/tools/mojom/version_compatibility_unittest.py
def testEnumValueRemoval(self):
    """Removal of an enum value is never valid even for [Extensible] enums."""
    self.assertNotBackwardCompatible('enum E { kFoo, kBar };',
                                     'enum E { kFoo };')
    self.assertNotBackwardCompatible('[Extensible] enum E { kFoo, kBar };',
                                     '[Extensible] enum E { kFoo };')
    self.assertNotBackwardCompatible(
        '[Extensible] enum E { kA, [MinVersion=1] kB };',
        '[Extensible] enum E { kA, };')
    self.assertNotBackwardCompatible(
        '[Extensible] enum E { kA, [MinVersion=1] kB, [MinVersion=1] kZ };',
        '[Extensible] enum E { kA, [MinVersion=1] kB };')
Removal of an enum value is never valid even for [Extensible] enums.
Removal of an enum value is never valid even for [Extensible] enums.
Removal of an enum value is never valid even for [ Extensible ] enums .
def testEnumValueRemoval(self):
    self.assertNotBackwardCompatible('enum E { kFoo, kBar };',
                                     'enum E { kFoo };')
    self.assertNotBackwardCompatible('[Extensible] enum E { kFoo, kBar };',
                                     '[Extensible] enum E { kFoo };')
    self.assertNotBackwardCompatible(
        '[Extensible] enum E { kA, [MinVersion=1] kB };',
        '[Extensible] enum E { kA, };')
    self.assertNotBackwardCompatible(
        '[Extensible] enum E { kA, [MinVersion=1] kB, [MinVersion=1] kZ };',
        '[Extensible] enum E { kA, [MinVersion=1] kB };')
def testEnumValueRemoval ( self ) : self . assertNotBackwardCompatible ( 'enum E { kFoo, kBar };' , 'enum E { kFoo };' ) self . assertNotBackwardCompatible ( '[Extensible] enum E { kFoo, kBar };' , '[Extensible] enum E { kFoo };' ) self . assertNotBackwardCompatible ( '[Extensible] enum E { kA, [MinVersion=1] kB };' , '[Extensible] enum E { kA, };' ) self . assertNotBackwardCompatible ( '[Extensible] enum E { kA, [MinVersion=1] kB, [MinVersion=1] kZ };' , '[Extensible] enum E { kA, [MinVersion=1] kB };' )
Removal of an enum value is never valid even for [Extensible] enums.
Removal of an enum value is never valid even for [ Extensible ] enums .
"""Removal of an enum value is never valid even for [Extensible] enums."""
self