mojo/public/tools/mojom/mojom/parse/parser_unittest.py
def testNestedNamespace(self):
    """Tests that "nested" namespaces work."""

    source = """\
        module my.mod;

        struct MyStruct {
          int32 a;
        };
        """
    expected = ast.Mojom(
        ast.Module(('IDENTIFIER', 'my.mod'), None), ast.ImportList(), [
            ast.Struct(
                'MyStruct', None,
                ast.StructBody(ast.StructField('a', None, None, 'int32', None)))
        ])
    self.assertEquals(parser.Parse(source, "my_file.mojom"), expected)
Tests that "nested" namespaces work.
Tests that "nested" namespaces work.
Tests that " nested " namespaces work .
def testNestedNamespace(self):
    source = """\
        module my.mod;
        struct MyStruct {
          int32 a;
        };
        """
    expected = ast.Mojom(
        ast.Module(('IDENTIFIER', 'my.mod'), None), ast.ImportList(), [
            ast.Struct(
                'MyStruct', None,
                ast.StructBody(ast.StructField('a', None, None, 'int32', None)))
        ])
    self.assertEquals(parser.Parse(source, "my_file.mojom"), expected)
def testNestedNamespace ( self ) : source = """\
        module my.mod;

        struct MyStruct {
          int32 a;
        };
        """ expected = ast . Mojom ( ast . Module ( ( 'IDENTIFIER' , 'my.mod' ) , None ) , ast . ImportList ( ) , [ ast . Struct ( 'MyStruct' , None , ast . StructBody ( ast . StructField ( 'a' , None , None , 'int32' , None ) ) ) ] ) self . assertEquals ( parser . Parse ( source , "my_file.mojom" ) , expected )
Tests that "nested" namespaces work.
Tests that " nested " namespaces work .
"""Tests that "nested" namespaces work."""
self