mojo/public/tools/mojom/version_compatibility_unittest.py
def testInterfaceMethodParamsChanged(self):
    """Changes to the parameter list are only backward-compatible if they meet
    backward-compatibility requirements of an equivalent struct definition."""
    self.assertNotBackwardCompatible('interface F { A(); };',
                                     'interface F { A(int32 x); };')
    self.assertNotBackwardCompatible('interface F { A(int32 x); };',
                                     'interface F { A(bool x); };')
    self.assertNotBackwardCompatible(
        'interface F { A(int32 x, [MinVersion=1] string? s); };', """\
        interface F {
          A(int32 x, [MinVersion=1] string? s, [MinVersion=1] int32 y);
        };""")

    self.assertBackwardCompatible('interface F { A(int32 x); };',
                                  'interface F { A(int32 a); };')
    self.assertBackwardCompatible(
        'interface F { A(int32 x); };',
        'interface F { A(int32 x, [MinVersion=1] string? s); };')

    self.assertBackwardCompatible(
        'struct S {}; interface F { A(S s); };',
        'struct S { [MinVersion=1] int32 x; }; interface F { A(S s); };')
    self.assertBackwardCompatible(
        'struct S {}; struct T {}; interface F { A(S s); };',
        'struct S {}; struct T {}; interface F { A(T s); };')
    self.assertNotBackwardCompatible(
        'struct S {}; struct T { int32 x; }; interface F { A(S s); };',
        'struct S {}; struct T { int32 x; }; interface F { A(T t); };')
Changes to the parameter list are only backward-compatible if they meet
    backward-compatibility requirements of an equivalent struct definition.
Changes to the parameter list are only backward-compatible if they meet
backward-compatibility requirements of an equivalent struct definition.
Changes to the parameter list are only backward - compatible if they meet backward - compatibility requirements of an equivalent struct definition .
def testInterfaceMethodParamsChanged(self):
    self.assertNotBackwardCompatible('interface F { A(); };',
                                     'interface F { A(int32 x); };')
    self.assertNotBackwardCompatible('interface F { A(int32 x); };',
                                     'interface F { A(bool x); };')
    self.assertNotBackwardCompatible(
        'interface F { A(int32 x, [MinVersion=1] string? s); };', """\
        interface F {
          A(int32 x, [MinVersion=1] string? s, [MinVersion=1] int32 y);
        };""")
    self.assertBackwardCompatible('interface F { A(int32 x); };',
                                  'interface F { A(int32 a); };')
    self.assertBackwardCompatible(
        'interface F { A(int32 x); };',
        'interface F { A(int32 x, [MinVersion=1] string? s); };')
    self.assertBackwardCompatible(
        'struct S {}; interface F { A(S s); };',
        'struct S { [MinVersion=1] int32 x; }; interface F { A(S s); };')
    self.assertBackwardCompatible(
        'struct S {}; struct T {}; interface F { A(S s); };',
        'struct S {}; struct T {}; interface F { A(T s); };')
    self.assertNotBackwardCompatible(
        'struct S {}; struct T { int32 x; }; interface F { A(S s); };',
        'struct S {}; struct T { int32 x; }; interface F { A(T t); };')
def testInterfaceMethodParamsChanged ( self ) : self . assertNotBackwardCompatible ( 'interface F { A(); };' , 'interface F { A(int32 x); };' ) self . assertNotBackwardCompatible ( 'interface F { A(int32 x); };' , 'interface F { A(bool x); };' ) self . assertNotBackwardCompatible ( 'interface F { A(int32 x, [MinVersion=1] string? s); };' , """\
        interface F {
          A(int32 x, [MinVersion=1] string? s, [MinVersion=1] int32 y);
        };""" ) self . assertBackwardCompatible ( 'interface F { A(int32 x); };' , 'interface F { A(int32 a); };' ) self . assertBackwardCompatible ( 'interface F { A(int32 x); };' , 'interface F { A(int32 x, [MinVersion=1] string? s); };' ) self . assertBackwardCompatible ( 'struct S {}; interface F { A(S s); };' , 'struct S { [MinVersion=1] int32 x; }; interface F { A(S s); };' ) self . assertBackwardCompatible ( 'struct S {}; struct T {}; interface F { A(S s); };' , 'struct S {}; struct T {}; interface F { A(T s); };' ) self . assertNotBackwardCompatible ( 'struct S {}; struct T { int32 x; }; interface F { A(S s); };' , 'struct S {}; struct T { int32 x; }; interface F { A(T t); };' )
Changes to the parameter list are only backward-compatible if they meet
backward-compatibility requirements of an equivalent struct definition.
Changes to the parameter list are only backward - compatible if they meet backward - compatibility requirements of an equivalent struct definition .
"""Changes to the parameter list are only backward-compatible if they meet
    backward-compatibility requirements of an equivalent struct definition."""
self