[lldb] [testsuite] Fix a regression of TestCppScope.py
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 18 Apr 2020 08:44:33 +0000 (10:44 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 18 Apr 2020 08:46:32 +0000 (10:46 +0200)
commit239093f30c342bc8a3feec1536a3154e394e55ca
tree1a53fe514791e5681966a64948620d2345ed4da7
parent60ce987bf31d6249c1f19e454f53b9d228925dcd
[lldb] [testsuite] Fix a regression of TestCppScope.py

This is a regression since:
  [lldb][NFC] Modernize lang/cpp/scope test
  acb0b99c8e4f1dc65a7f1e26da9db77239a67da7
  rGacb0b99c8e4f

  File "/home/jkratoch/redhat/llvm-monorepo/lldb/test/API/lang/cpp/scope/TestCppScope.py", line 19, in test
    self.assertEqual(global_var_names, expected_var_names)
  AssertionError: Lists differ: ['C::a', 'A::a', 'B::a', '::a'... != ['A::a', 'B::a', 'C::a', '::a'...
  First differing element 0:
  C::a
  A::a
  - ['C::a', 'A::a', 'B::a', '::a']
  + ['A::a', 'B::a', 'C::a', '::a']

ManualDWARFIndex using NameToDIE does not sort alphabetically:
    // This is only for uniqueness, not lexicographical ordering, so we can
    // just compare pointers.
    return uintptr_t(lhs.GetCString()) < uintptr_t(rhs.GetCString());
lldb/test/API/lang/cpp/scope/TestCppScope.py