| OLD | NEW |
| 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
| 3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 from os.path import join, exists | 7 from os.path import join, exists |
| 8 import re | 8 import re |
| 9 | 9 |
| 10 import test | 10 import test |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 self.mode = mode | 22 self.mode = mode |
| 23 self.arch = arch | 23 self.arch = arch |
| 24 self.component = component | 24 self.component = component |
| 25 self._is_negative = None | 25 self._is_negative = None |
| 26 | 26 |
| 27 def IsNegative(self): | 27 def IsNegative(self): |
| 28 if self._is_negative is None : | 28 if self._is_negative is None : |
| 29 contents = self.GetSource() | 29 contents = self.GetSource() |
| 30 if '@compile-error' in contents or '@runtime-error' in contents: | 30 if '@compile-error' in contents or '@runtime-error' in contents: |
| 31 self._is_negative = True | 31 self._is_negative = True |
| 32 elif '@dynamic-type-error' in contents: | |
| 33 self._is_negative = self.context.checked | |
| 34 else: | 32 else: |
| 35 self._is_negative = False | 33 self._is_negative = False |
| 36 return self._is_negative | 34 return self._is_negative |
| 37 | 35 |
| 38 def GetLabel(self): | 36 def GetLabel(self): |
| 39 return "%s%s %s %s" % (self.mode, self.arch, self.component, | 37 return "%s%s %s %s" % (self.mode, self.arch, self.component, |
| 40 "/".join(self.path)) | 38 "/".join(self.path)) |
| 41 | 39 |
| 42 def GetCommand(self): | 40 def GetCommand(self): |
| 43 # Parse the options by reading the .dart source file. | 41 # Parse the options by reading the .dart source file. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 patterns[idx : idx] = ['*'] * (len(file) - len(path)) | 131 patterns[idx : idx] = ['*'] * (len(file) - len(path)) |
| 134 path = [test.Pattern(p) for p in patterns] | 132 path = [test.Pattern(p) for p in patterns] |
| 135 | 133 |
| 136 for i in xrange(len(path)): | 134 for i in xrange(len(path)): |
| 137 if not path[i].match(file[i]): | 135 if not path[i].match(file[i]): |
| 138 return False | 136 return False |
| 139 return True | 137 return True |
| 140 | 138 |
| 141 def GetConfiguration(context, root): | 139 def GetConfiguration(context, root): |
| 142 return Co19TestConfiguration(context, root) | 140 return Co19TestConfiguration(context, root) |
| OLD | NEW |