Lines Matching refs:self

22   def __init__(self, fileName):  argument
23 self.fileName = fileName
24 self.testCases = []
26 def addTestCase(self, new_test_case): argument
27 self.testCases.append(new_test_case)
29 def testCasesForArch(self, targetArch): argument
30 return [t for t in self.testCases if t.testArch == targetArch]
32 def __eq__(self, other): argument
33 return isinstance(other, self.__class__) \
34 and self.testCases == other.testCases
39 def __init__(self, parent, name, startLineNo, testArch = None, forDebuggable = False): argument
42 self.parent = parent
43 self.name = name
44 self.assertions = []
45 self.startLineNo = startLineNo
46 self.testArch = testArch
47 self.forDebuggable = forDebuggable
49 if not self.name:
50 Logger.fail("Test case does not have a name", self.fileName, self.startLineNo)
52 self.parent.addTestCase(self)
55 def fileName(self): argument
56 return self.parent.fileName
58 def addAssertion(self, new_assertion): argument
60 if not self.assertions or \
61 (self.assertions[-1].variant != TestAssertion.Variant.InOrder and \
62 self.assertions[-1].variant != TestAssertion.Variant.NextLine):
66 self.assertions.append(new_assertion)
68 def __eq__(self, other): argument
69 return isinstance(other, self.__class__) \
70 and self.name == other.name \
71 and self.assertions == other.assertions
80 def __init__(self, parent, variant, originalText, lineNo): argument
83 self.parent = parent
84 self.variant = variant
85 self.expressions = []
86 self.lineNo = lineNo
87 self.originalText = originalText
89 self.parent.addAssertion(self)
92 def fileName(self): argument
93 return self.parent.fileName
95 def addExpression(self, new_expression): argument
97 if self.variant == TestAssertion.Variant.Not:
99 Logger.fail("CHECK-NOT lines cannot define variables", self.fileName, self.lineNo)
100 self.expressions.append(new_expression)
102 def toRegex(self): argument
105 for expression in self.expressions:
112 def __eq__(self, other): argument
113 return isinstance(other, self.__class__) \
114 and self.variant == other.variant \
115 and self.expressions == other.expressions
138 def __init__(self, variant, name, text): argument
139 self.variant = variant
140 self.name = name
141 self.text = text
143 def __eq__(self, other): argument
144 return isinstance(other, self.__class__) \
145 and self.variant == other.variant \
146 and self.name == other.name \
147 and self.text == other.text