mojo/public/tools/mojom/mojom/parse/conditional_features_unittest.py
def testFilterInterface(self):
    """Test that definitions are correctly filtered from an Interface."""
    interface_source = """
      interface MyInterface {
        [EnableIf=blue]
        enum MyEnum {
          [EnableIf=purple]
          VALUE1,
          VALUE2,
        };
        [EnableIf=blue]
        const int32 kMyConst = 123;
        [EnableIf=purple]
        MyMethod();
      };
    """
    expected_source = """
      interface MyInterface {
        [EnableIf=blue]
        enum MyEnum {
          VALUE2,
        };
        [EnableIf=blue]
        const int32 kMyConst = 123;
      };
    """
    self.parseAndAssertEqual(interface_source, expected_source)
Test that definitions are correctly filtered from an Interface.
Test that definitions are correctly filtered from an Interface.
Test that definitions are correctly filtered from an Interface .
def testFilterInterface(self):
    interface_source = """
      interface MyInterface {
        [EnableIf=blue]
        enum MyEnum {
          [EnableIf=purple]
          VALUE1,
          VALUE2,
        };
        [EnableIf=blue]
        const int32 kMyConst = 123;
        [EnableIf=purple]
        MyMethod();
      };
    """
    expected_source = """
      interface MyInterface {
        [EnableIf=blue]
        enum MyEnum {
          VALUE2,
        };
        [EnableIf=blue]
        const int32 kMyConst = 123;
      };
    """
    self.parseAndAssertEqual(interface_source, expected_source)
def testFilterInterface ( self ) : interface_source = """
      interface MyInterface {
        [EnableIf=blue]
        enum MyEnum {
          [EnableIf=purple]
          VALUE1,
          VALUE2,
        };
        [EnableIf=blue]
        const int32 kMyConst = 123;
        [EnableIf=purple]
        MyMethod();
      };
    """ expected_source = """
      interface MyInterface {
        [EnableIf=blue]
        enum MyEnum {
          VALUE2,
        };
        [EnableIf=blue]
        const int32 kMyConst = 123;
      };
    """ self . parseAndAssertEqual ( interface_source , expected_source )
Test that definitions are correctly filtered from an Interface.
Test that definitions are correctly filtered from an Interface .
"""Test that definitions are correctly filtered from an Interface."""
self