Lines Matching refs:self

86   def __init__(self):  argument
90 self.tests = set()
92 def add_test(self, ty): argument
96 self.tests.add(Func(ty))
98 def get_expected(self): argument
102 all_tests = sorted(self.tests)
105 def initial_build_different(self): argument
108 def get_name(self): argument
114 def __str__(self): argument
118 all_tests = sorted(self.tests)
124 test_invoke += self.TEST_GROUP_INVOKE_TEMPLATE.format(test_name=t.get_name())
125 main_func = self.MAIN_FUNCTION_TEMPLATE.format(test_group_invoke=test_invoke)
127 return self.MAIN_CLASS_TEMPLATE.format(copyright = get_copyright('smali'),
186 def __init__(self, farg): argument
190 self.farg = farg
192 def __str__(self): argument
196 return self.TEST_FUNCTION_TEMPLATE.format(fname = self.get_name(),
197 farg = self.farg.get_name(),
198 tree = self.farg.get_tree())
200 def get_name(self): argument
204 return "TEST_FUNC_{}".format(self.farg.get_name())
206 def get_expected(self): argument
210 return self.OUTPUT_FORMAT.format(
211 tree = self.farg.get_tree(),
212 test_output = self.farg.get_test_output().strip())
346 def __init__(self, ifaces, name = None): argument
350 self.ifaces = ifaces
352 self.class_name = "CLASS_"+gensym()
354 self.class_name = name
356 def get_initial_build_version(self): argument
361 return TestClass([i.get_initial_build_version() for i in self.ifaces], self.class_name)
363 def initial_build_different(self): argument
366 def get_name(self): argument
370 return self.class_name
372 def get_tree(self): argument
376 return "[{fname} {iftree}]".format(fname = self.get_name(), iftree = print_tree(self.ifaces))
378 def get_test_output(self): argument
379 return '\n'.join(map(lambda a: self.OUTPUT_TEMPLATE.format(class_name = self.get_name(),
382 self.ifaces))
384 def __str__(self): argument
388 funcs = '\n'.join(map(lambda a: self.TEST_FUNC_TEMPLATE.format(iface = a.get_name(),
389 class_name = self.get_name()),
390 self.ifaces))
391 calls = '\n'.join(map(lambda a: self.TEST_CALL_TEMPLATE.format(iface = a.get_name(),
392 class_name = self.get_name()),
393 self.ifaces))
394 s_ifaces = '\n'.join(map(lambda a: self.IMPLEMENTS_TEMPLATE.format(iface_name = a.get_name()),
395 self.ifaces))
396 j_ifaces = ', '.join(map(lambda a: a.get_name(), self.ifaces))
397 return self.TEST_CLASS_TEMPLATE.format(copyright = get_copyright('smali'),
400 class_name = self.class_name,
405 def get_name(self): argument
411 def get_name(self): argument
451 def __init__(self, ifaces, default, name = None): argument
455 self.ifaces = ifaces
456 self.default = default
459 self.class_name = "INTERFACE_"+gensym()+end
461 self.class_name = name
463 def get_initial_build_version(self): argument
468 return TestInterface([i.get_initial_build_version() for i in self.ifaces],
470 self.class_name)
472 def initial_build_different(self): argument
473 return not self.default
475 def get_name(self): argument
479 return self.class_name
481 def __iter__(self): argument
486 for i in self.ifaces:
490 def get_called(self): argument
495 all_ifaces = set(iface for iface in self if iface.default)
501 def get_super_types(self): argument
505 return set(i2 for i2 in self)
507 def get_output(self): argument
508 if self.default:
509 return self.get_name()
511 return self.get_called().get_name()
513 def get_tree(self): argument
517 return "[{class_name} {iftree}]".format(class_name = self.get_name(),
518 iftree = print_tree(self.ifaces))
519 def __str__(self): argument
523 s_ifaces = '\n'.join(map(lambda a: self.IMPLEMENTS_TEMPLATE.format(iface_name = a.get_name()),
524 self.ifaces))
525 j_ifaces = ', '.join(map(lambda a: a.get_name(), self.ifaces))
526 if self.default:
527 funcs = self.DEFAULT_FUNC_TEMPLATE.format(class_name = self.class_name)
529 funcs = self.ABSTRACT_FUNC_TEMPLATE
530 return self.TEST_INTERFACE_TEMPLATE.format(copyright = get_copyright('smali'),
532 extends = "extends" if len(self.ifaces) else "",
535 class_name = self.class_name)