mojo/public/tools/mojom/stable_attribute_unittest.py
def testStableInterface(self):
    """A [Stable] interface is valid if all its methods' parameter types are
    stable, including response parameters where applicable."""
    self.ExtractTypes('[Stable] interface F {};')
    self.ExtractTypes('[Stable] interface F { A@0(int32 x); };')
    self.ExtractTypes('[Stable] interface F { A@0(int32 x) => (bool b); };')
    self.ExtractTypes("""\
        [Stable] enum E { A, B, C };
        [Stable] struct S {};
        [Stable] interface F { A@0(E e, S s) => (bool b, array<S> s); };
        """)

    with self.assertRaisesRegexp(Exception, 'because it depends on E'):
      self.ExtractTypes(
          'enum E { A, B, C }; [Stable] interface F { A@0(E e); };')
    with self.assertRaisesRegexp(Exception, 'because it depends on E'):
      self.ExtractTypes(
          'enum E { A, B, C }; [Stable] interface F { A@0(int32 x) => (E e); };'
      )
    with self.assertRaisesRegexp(Exception, 'because it depends on S'):
      self.ExtractTypes(
          'struct S {}; [Stable] interface F { A@0(int32 x) => (S s); };')
    with self.assertRaisesRegexp(Exception, 'because it depends on S'):
      self.ExtractTypes(
          'struct S {}; [Stable] interface F { A@0(S s) => (bool b); };')

    with self.assertRaisesRegexp(Exception, 'explicit method ordinals'):
      self.ExtractTypes('[Stable] interface F { A() => (); };')
A [Stable] interface is valid if all its methods' parameter types are
    stable, including response parameters where applicable.
A [Stable] interface is valid if all its methods' parameter types are
stable, including response parameters where applicable.
A [ Stable ] interface is valid if all its methods ' parameter types are stable including response parameters where applicable .
def testStableInterface(self):
    self.ExtractTypes('[Stable] interface F {};')
    self.ExtractTypes('[Stable] interface F { A@0(int32 x); };')
    self.ExtractTypes('[Stable] interface F { A@0(int32 x) => (bool b); };')
    self.ExtractTypes("""\
        [Stable] enum E { A, B, C };
        [Stable] struct S {};
        [Stable] interface F { A@0(E e, S s) => (bool b, array<S> s); };
        """)
    with self.assertRaisesRegexp(Exception, 'because it depends on E'):
      self.ExtractTypes(
          'enum E { A, B, C }; [Stable] interface F { A@0(E e); };')
    with self.assertRaisesRegexp(Exception, 'because it depends on E'):
      self.ExtractTypes(
          'enum E { A, B, C }; [Stable] interface F { A@0(int32 x) => (E e); };'
      )
    with self.assertRaisesRegexp(Exception, 'because it depends on S'):
      self.ExtractTypes(
          'struct S {}; [Stable] interface F { A@0(int32 x) => (S s); };')
    with self.assertRaisesRegexp(Exception, 'because it depends on S'):
      self.ExtractTypes(
          'struct S {}; [Stable] interface F { A@0(S s) => (bool b); };')
    with self.assertRaisesRegexp(Exception, 'explicit method ordinals'):
      self.ExtractTypes('[Stable] interface F { A() => (); };')
def testStableInterface ( self ) : self . ExtractTypes ( '[Stable] interface F {};' ) self . ExtractTypes ( '[Stable] interface F { A@0(int32 x); };' ) self . ExtractTypes ( '[Stable] interface F { A@0(int32 x) => (bool b); };' ) self . ExtractTypes ( """\
        [Stable] enum E { A, B, C };
        [Stable] struct S {};
        [Stable] interface F { A@0(E e, S s) => (bool b, array<S> s); };
        """ ) with self . assertRaisesRegexp ( Exception , 'because it depends on E' ) : self . ExtractTypes ( 'enum E { A, B, C }; [Stable] interface F { A@0(E e); };' ) with self . assertRaisesRegexp ( Exception , 'because it depends on E' ) : self . ExtractTypes ( 'enum E { A, B, C }; [Stable] interface F { A@0(int32 x) => (E e); };' ) with self . assertRaisesRegexp ( Exception , 'because it depends on S' ) : self . ExtractTypes ( 'struct S {}; [Stable] interface F { A@0(int32 x) => (S s); };' ) with self . assertRaisesRegexp ( Exception , 'because it depends on S' ) : self . ExtractTypes ( 'struct S {}; [Stable] interface F { A@0(S s) => (bool b); };' ) with self . assertRaisesRegexp ( Exception , 'explicit method ordinals' ) : self . ExtractTypes ( '[Stable] interface F { A() => (); };' )
A [Stable] interface is valid if all its methods' parameter types are
stable, including response parameters where applicable.
A [ Stable ] interface is valid if all its methods ' parameter types are stable including response parameters where applicable .
"""A [Stable] interface is valid if all its methods' parameter types are
    stable, including response parameters where applicable."""
self