================
@@ -64,12 +93,49 @@ def do_test(self):
"frame var p.child.parent", substrs=["p.child.parent = {\n Value
= 0x"]
)
+ if test_smart_pointers:
+ # shared_pointer
+ atomic_shared = self.get_variable("atomic_shared")
+ val_shared = atomic_shared.child[0]
+ self.assertIsNotNone(val_shared, msg="atomic_shared child is
None.")
+ self.assertEqual(300, val_shared.deref.unsigned)
+
+ # weak_pointer
+ atomic_weak = self.get_variable("atomic_weak")
+ val_weak = atomic_weak.child[0]
+ self.assertIsNotNone(val_weak, msg="atomic_weak child is None.")
+ self.assertEqual(300, val_weak.deref.unsigned)
+
+ def verify_floating_point_equal(self, value: str, expected: float):
+ self.assertAlmostEqual(float(value), float(expected), places=4)
+
@skipIf(compiler=["gcc"])
@add_test_categories(["libc++"])
def test_libcxx(self):
self.build(dictionary={"USE_LIBCPP": 1})
self.do_test()
+ @add_test_categories(["libstdcxx"])
+ def test_libstdcxx(self):
+ self.build(dictionary={"USE_LIBSTDCPP": 1})
+ self.do_test()
+
+ # the data layout is different in new libstdc++ versions
----------------
Michael137 wrote:
Technically not `libstdc++` versions but C++ standards.
I think we should just bump the `Makefile` version to `-std=c++20`. Then remove
all of these `test_libstdcxx_` invocations.
If the layout actually changes between libstdc++ versions, we would test this
with the "layout simulator tests". E.g., see `libcxx-simulators` in the lldb
test directory.
https://github.com/llvm/llvm-project/pull/174218
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits