summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-03-08 22:12:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-03-08 22:12:42 (GMT)
commite1bda768f573b84e340bfcdc59fe353eb665f8e6 (patch)
treed96e146ef8282d9fba7c3741e5ff29c7b5c38f5f /tests
parent1f3917fe0254198a4dbadb9a195ba076ae12736d (diff)
Fixed some mistakes in the Itanium prefixes demangling.
Diffstat (limited to 'tests')
-rw-r--r--tests/mangling/itanium.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/mangling/itanium.py b/tests/mangling/itanium.py
index 6808a99..57a1129 100644
--- a/tests/mangling/itanium.py
+++ b/tests/mangling/itanium.py
@@ -177,6 +177,24 @@ class TestItaniumMangling(ChrysalideTestCase):
self.check_demangling(demangled, 'void std::partial_sort<__gnu_cxx::__normal_iterator<CPR_MAI_ADPTY_SectorSequence *, std::vector<CPR_MAI_ADPTY_SectorSequence, std::allocator<CPR_MAI_ADPTY_SectorSequence>>>>(__gnu_cxx::__normal_iterator<CPR_MAI_ADPTY_SectorSequence *, std::vector<CPR_MAI_ADPTY_SectorSequence, std::allocator<CPR_MAI_ADPTY_SectorSequence>>>, __gnu_cxx::__normal_iterator<CPR_MAI_ADPTY_SectorSequence *, std::vector<CPR_MAI_ADPTY_SectorSequence, std::allocator<CPR_MAI_ADPTY_SectorSequence>>>, __gnu_cxx::__normal_iterator<CPR_MAI_ADPTY_SectorSequence *, std::vector<CPR_MAI_ADPTY_SectorSequence, std::allocator<CPR_MAI_ADPTY_SectorSequence>>>)')
+ def testPrefixLoop(self):
+ """Handle the loop between prefixes defined in the specifications."""
+
+ demangler = ItaniumDemangler()
+
+ demangled = demangler.decode_routine('_ZN2aaIN4ccccIfEEE5dddddEj')
+ self.check_demangling(demangled, '??? aa<cccc<float>>::ddddd(unsigned int)')
+
+ demangled = demangler.decode_routine('_ZN2aaIN4cccc4xxxxIfEEE5dddddEj')
+ self.check_demangling(demangled, '??? aa<cccc::xxxx<float>>::ddddd(unsigned int)')
+
+ demangled = demangler.decode_routine('_ZN3zzz2aaIN4cccc4xxxxIfEEE5dddddEj')
+ self.check_demangling(demangled, '??? zzz::aa<cccc::xxxx<float>>::ddddd(unsigned int)')
+
+ demangled = demangler.decode_routine('_ZN3aaa3bbbINS_3cccIfEEE3dddEj')
+ self.check_demangling(demangled, '??? aaa::bbb<ccc<float>>::ddd(unsigned int)')
+
+
def testAndroidSystem(self):
"""Check Itanium routine demangling from Android system cases."""
@@ -187,3 +205,6 @@ class TestItaniumMangling(ChrysalideTestCase):
demangled = demangler.decode_routine('_ZN6icu_556LocaleaSERKS0_')
self.check_demangling(demangled, '??? icu_55::Locale::operator=(const icu_55::Locale &)')
+
+ demangled = demangler.decode_routine('_ZNSt3__16vectorIfNS_9allocatorIfEEE8__appendEj')
+ self.check_demangling(demangled, '??? std::__1::vector<float, allocator<float>>::__append(unsigned int)')