Exemplo n.º 1
0
 def test_incomplete_sequence(self):
     # Newer versions of gdb insert these incomplete sequence elements
     self.assertEquals(
         'uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237\\350", node = "\\b\\000+\\020H`"}, if_version = 2',
         normalise_signature('$244 = {uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237", <incomplete sequence \\350>, node = "\\b\\000+\\020H`"}, if_version = 2}'))
     self.assertEquals(
         'uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237\\350", node = "\\b\\000+\\020H`"}, if_version = 2',
         normalise_signature('$244 = {uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237\\350", node = "\\b\\000+\\020H`"}, if_version = 2}'))
Exemplo n.º 2
0
 def test_incomplete_sequence(self):
     # Newer versions of gdb insert these incomplete sequence elements
     self.assertEquals(
         'uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237\\350", node = "\\b\\000+\\020H`"}, if_version = 2',
         normalise_signature('$244 = {uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237", <incomplete sequence \\350>, node = "\\b\\000+\\020H`"}, if_version = 2}'))
     self.assertEquals(
         'uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237\\350", node = "\\b\\000+\\020H`"}, if_version = 2',
         normalise_signature('$244 = {uuid = {time_low = 2324192516, time_mid = 7403, time_hi_and_version = 4553, clock_seq = "\\237\\350", node = "\\b\\000+\\020H`"}, if_version = 2}'))
Exemplo n.º 3
0
 def test_struct_constant(self):
     self.assertEquals(
         'uuid = {time_low = 0, time_mid = 0, time_hi_and_version = 0, clock_seq = "\\000", node = "\\000\\000\\000\\000\\000"}, if_version = 0',
         normalise_signature(
             '$239 = {uuid = {time_low = 0, time_mid = 0, time_hi_and_version = 0, clock_seq = "\\000", node = "\\000\\000\\000\\000\\000"}, if_version = 0}'
         ))
Exemplo n.º 4
0
 def test_function_keep(self):
     self.assertEquals(
         "enum ndr_err_code (struct ndr_push *, int, const union winreg_Data *)",
         normalise_signature(
             "enum ndr_err_code (struct ndr_push *, int, const union winreg_Data *)"
         ))
Exemplo n.º 5
0
 def test_maps_Bool(self):
     # Some types have different internal names
     self.assertEquals(
         "bool (const struct GUID *)",
         normalise_signature(
             "$1 = {_Bool (const struct GUID *)} 0xe75b <GUID_all_zero>"))
Exemplo n.º 6
0
 def test_function_simple(self):
     self.assertEquals(
         "int (const struct GUID *, const struct GUID *)",
         normalise_signature(
             "$2 = {int (const struct GUID *, const struct GUID *)} 0xe871 <GUID_compare>"
         ))
Exemplo n.º 7
0
 def test_struct_constant(self):
     self.assertEquals(
         'uuid = {time_low = 0, time_mid = 0, time_hi_and_version = 0, clock_seq = "\\000", node = "\\000\\000\\000\\000\\000"}, if_version = 0',
         normalise_signature('$239 = {uuid = {time_low = 0, time_mid = 0, time_hi_and_version = 0, clock_seq = "\\000", node = "\\000\\000\\000\\000\\000"}, if_version = 0}'))
Exemplo n.º 8
0
 def test_function_keep(self):
     self.assertEquals(
         "enum ndr_err_code (struct ndr_push *, int, const union winreg_Data *)",
         normalise_signature("enum ndr_err_code (struct ndr_push *, int, const union winreg_Data *)"))
Exemplo n.º 9
0
 def test_maps_Bool(self):
     # Some types have different internal names
     self.assertEquals("bool (const struct GUID *)",
         normalise_signature("$1 = {_Bool (const struct GUID *)} 0xe75b <GUID_all_zero>"))
Exemplo n.º 10
0
 def test_function_simple(self):
     self.assertEquals("int (const struct GUID *, const struct GUID *)",
         normalise_signature("$2 = {int (const struct GUID *, const struct GUID *)} 0xe871 <GUID_compare>"))