Home
last modified time | relevance | path

Searched refs:TestExpression (Results 1 – 4 of 4) sorted by relevance

/art/tools/checker/file_format/checker/
Dstruct.py105 assert isinstance(new_expression, TestExpression)
107 if new_expression.variant == TestExpression.Variant.VAR_DEF:
115 if expression.variant == TestExpression.Variant.SEPARATOR:
127 class TestExpression(EqualityMixin, PrintableMixin): class
160 return TestExpression(TestExpression.Variant.SEPARATOR, None, None)
164 return TestExpression(TestExpression.Variant.PLAIN_TEXT, None, text)
168 return TestExpression(TestExpression.Variant.PATTERN, None, re.escape(text))
172 return TestExpression(TestExpression.Variant.PATTERN, None, pattern)
176 assert re.match(TestExpression.Regex.R_NAME, name)
177 return TestExpression(TestExpression.Variant.VAR_REF, name, None)
[all …]
Dtest.py19 from file_format.checker.struct import CheckerFile, TestCase, TestStatement, TestExpression
97 TestExpression.create_pattern_from_plain_text(text))
100 self.assertEqual(self.parse_expression(string), TestExpression.create_pattern(pattern))
103 self.assertEqual(self.parse_expression(string), TestExpression.create_variable_reference(name))
107 TestExpression.create_variable_definition(name, pattern))
172 self.assertVariantNotEqual("<<>>", TestExpression.Variant.VAR_REF)
173 self.assertVariantNotEqual("<<:>>", TestExpression.Variant.VAR_DEF)
176 self.assertVariantNotEqual("<<0ABC>>", TestExpression.Variant.VAR_REF)
177 self.assertVariantNotEqual("<<AB=C>>", TestExpression.Variant.VAR_REF)
178 self.assertVariantNotEqual("<<ABC=>>", TestExpression.Variant.VAR_REF)
[all …]
Dparser.py18 from file_format.checker.struct import CheckerFile, TestCase, TestStatement, TestExpression
178 match_pattern = re.search(TestExpression.Regex.REGEX_PATTERN, line)
179 match_variable_definition = re.search(TestExpression.Regex.REGEX_VARIABLE_DEFINITION, line)
180 match_variable_reference = re.search(TestExpression.Regex.REGEX_VARIABLE_REFERENCE, line)
188 statement.add_expression(TestExpression.create_separator())
193 statement.add_expression(TestExpression.create_pattern(pattern))
198 statement.add_expression(TestExpression.create_variable_reference(name))
205 statement.add_expression(TestExpression.create_variable_definition(name, body))
218 statement.add_expression(TestExpression.create_plain_text(text))
220 statement.add_expression(TestExpression.create_pattern_from_plain_text(text))
/art/tools/checker/match/
Dline.py16 from file_format.checker.struct import TestExpression, TestStatement
32 if expression.variant == TestExpression.Variant.SEPARATOR:
59 if expression.variant == TestExpression.Variant.VAR_REF:
78 if expression.variant == TestExpression.Variant.VAR_DEF:
121 if expression.variant == TestExpression.Variant.PLAIN_TEXT:
124 assert expression.variant == TestExpression.Variant.VAR_REF