Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: dart/tests/co19/testcfg.py

Issue 9310118: @dynamic-type-error are no longer negative tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/tests/co19/co19-runtime.status ('k') | dart/tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « dart/tests/co19/co19-runtime.status ('k') | dart/tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698