Lines Matching refs:self
16 def __init__(self, exported_symbols): argument
17 self.exported_symbols = exported_symbols
22 def __init__(self, path, exported_symbols): argument
23 self.path = path
24 self.elf = MockELF(exported_symbols)
28 def setUp(self): argument
29 self.ref = GenericRefs()
30 self.ref.add('/system/lib/libc.so',
32 self.ref.add('/system/lib/libm.so',
34 self.ref.add('/system/lib64/libc.so',
36 self.ref.add('/system/lib64/libm.so',
40 def test_create_from_sym_dir(self): argument
44 self.assertEqual(4, len(g.refs))
46 self.assertIn('/system/lib/libc.so', g.refs)
47 self.assertIn('/system/lib/libm.so', g.refs)
48 self.assertIn('/system/lib64/libc.so', g.refs)
49 self.assertIn('/system/lib64/libm.so', g.refs)
51 self.assertEqual({'fclose', 'fopen', 'fread', 'fwrite'},
53 self.assertEqual({'fclose', 'fopen', 'fread', 'fwrite'},
56 self.assertEqual({'cos', 'sin', 'tan'},
58 self.assertEqual({'cos', 'sin', 'tan'},
62 def test_classify_lib(self): argument
70 self.assertEqual(GenericRefs.MODIFIED, self.ref.classify_lib(libc_sub))
71 self.assertEqual(GenericRefs.EXPORT_SUPER_SET,
72 self.ref.classify_lib(libc_sup))
73 self.assertEqual(GenericRefs.EXPORT_EQUAL,
74 self.ref.classify_lib(libc_eq))
75 self.assertEqual(GenericRefs.NEW_LIB, self.ref.classify_lib(libfoo))
78 def test_is_equivalent_lib(self): argument
85 self.assertFalse(self.ref.is_equivalent_lib(libc_sub))
86 self.assertFalse(self.ref.is_equivalent_lib(libc_sup))
88 self.assertTrue(self.ref.is_equivalent_lib(libc_eq))
91 def test_has_same_name_lib(self): argument
92 self.assertTrue(self.ref.has_same_name_lib(
94 self.assertFalse(self.ref.has_same_name_lib(