| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/env python |
| 2 # | |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 6 | 5 |
| 7 """ Hierarchical property system for IDL AST """ | 6 """ Hierarchical property system for IDL AST """ |
| 8 import re | 7 import re |
| 9 import sys | 8 import sys |
| 10 | 9 |
| 11 from idl_log import ErrOut, InfoOut, WarnOut | 10 from idl_log import ErrOut, InfoOut, WarnOut |
| 12 from idl_option import GetOption, Option, ParseOptions | 11 from idl_option import GetOption, Option, ParseOptions |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 errors += ExpectText(child, '$CHILD$', 'child') | 172 errors += ExpectText(child, '$CHILD$', 'child') |
| 174 errors += ExpectText(child, '$PARENT1$', 'parent1') | 173 errors += ExpectText(child, '$PARENT1$', 'parent1') |
| 175 errors += ExpectText(child, '$PARENT2$', 'parent2') | 174 errors += ExpectText(child, '$PARENT2$', 'parent2') |
| 176 | 175 |
| 177 # Verify recursive resolution | 176 # Verify recursive resolution |
| 178 errors += ExpectText(child, '$TOPMOST$', 'top') | 177 errors += ExpectText(child, '$TOPMOST$', 'top') |
| 179 | 178 |
| 180 if not errors: InfoOut.Log('Passed MultiParentTest') | 179 if not errors: InfoOut.Log('Passed MultiParentTest') |
| 181 return errors | 180 return errors |
| 182 | 181 |
| 182 |
| 183 def Main(): | 183 def Main(): |
| 184 errors = 0 | 184 errors = 0 |
| 185 errors += PropertyTest() | 185 errors += PropertyTest() |
| 186 errors += ReplaceTest() | 186 errors += ReplaceTest() |
| 187 errors += MultiParentTest() | 187 errors += MultiParentTest() |
| 188 | 188 |
| 189 if errors: | 189 if errors: |
| 190 ErrOut.Log('IDLNode failed with %d errors.' % errors) | 190 ErrOut.Log('IDLNode failed with %d errors.' % errors) |
| 191 return -1 | 191 return -1 |
| 192 return 0 | 192 return 0 |
| 193 | 193 |
| 194 |
| 194 if __name__ == '__main__': | 195 if __name__ == '__main__': |
| 195 sys.exit(Main()) | 196 sys.exit(Main()) |
| 196 | |
| OLD | NEW |