| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import mojom | 5 import mojom |
| 6 import sys | 6 import sys |
| 7 import traceback | 7 import traceback |
| 8 | 8 |
| 9 # Support for writing mojom test cases. | 9 # Support for writing mojom test cases. |
| 10 # RunTest(fn) will execute fn, catching any exceptions. fn should return | 10 # RunTest(fn) will execute fn, catching any exceptions. fn should return |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 except: | 184 except: |
| 185 traceback.print_exc(sys.stderr) | 185 traceback.print_exc(sys.stderr) |
| 186 errors = 1 | 186 errors = 1 |
| 187 if errors == 0: | 187 if errors == 0: |
| 188 sys.stdout.write('OK\n') | 188 sys.stdout.write('OK\n') |
| 189 elif errors == 1: | 189 elif errors == 1: |
| 190 sys.stdout.write('1 ERROR\n') | 190 sys.stdout.write('1 ERROR\n') |
| 191 else: | 191 else: |
| 192 sys.stdout.write('%d ERRORS\n' % errors) | 192 sys.stdout.write('%d ERRORS\n' % errors) |
| 193 return errors | 193 return errors |
| OLD | NEW |