def testToSnakeCase(self): self.assertEquals("snake_case", generator.ToLowerSnakeCase("SnakeCase")) self.assertEquals("snake_case", generator.ToLowerSnakeCase("snakeCase")) self.assertEquals("snake_case", generator.ToLowerSnakeCase("SnakeCASE")) self.assertEquals("snake_d3d11_case", generator.ToLowerSnakeCase("SnakeD3D11Case")) self.assertEquals("snake_d3d11_case", generator.ToLowerSnakeCase("SnakeD3d11Case")) self.assertEquals("snake_d3d11_case", generator.ToLowerSnakeCase("snakeD3d11Case")) self.assertEquals("SNAKE_CASE", generator.ToUpperSnakeCase("SnakeCase")) self.assertEquals("SNAKE_CASE", generator.ToUpperSnakeCase("snakeCase")) self.assertEquals("SNAKE_CASE", generator.ToUpperSnakeCase("SnakeCASE")) self.assertEquals("SNAKE_D3D11_CASE", generator.ToUpperSnakeCase("SnakeD3D11Case")) self.assertEquals("SNAKE_D3D11_CASE", generator.ToUpperSnakeCase("SnakeD3d11Case")) self.assertEquals("SNAKE_D3D11_CASE", generator.ToUpperSnakeCase("snakeD3d11Case"))
def StylizeConstant(self, mojom_name): return generator.ToUpperSnakeCase(mojom_name)
def ConstantStyle(name): return generator.ToUpperSnakeCase(name)