================
@@ -0,0 +1,42 @@
+"""
+Test std::*_ordering summary.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class StdOrderingTestCase(TestBase):
+ def do_test(self):
+ lldbutil.run_to_source_breakpoint(
+ self, "// break here", lldb.SBFileSpec("main.cpp")
+ )
+
+ self.expect(
+ "frame variable",
+ substrs=[
+ "(std::partial_ordering) po_less = less",
+ "(std::partial_ordering) po_equivalent = equivalent",
+ "(std::partial_ordering) po_greater = greater",
+ "(std::partial_ordering) po_unordered = unordered",
+ "(std::weak_ordering) wo_less = less",
+ "(std::weak_ordering) wo_equivalent = equivalent",
+ "(std::weak_ordering) wo_greater = greater",
+ "(std::strong_ordering) so_less = less",
+ "(std::strong_ordering) so_equal = equal",
+ "(std::strong_ordering) so_equivalent = equal",
----------------
DrSergei wrote:
They have the same value representation (0). Both of [GDB
pretty-printers](https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/python/libstdcxx/v6/printers.py#L1797)
and [MSVC
Natvis](https://github.com/microsoft/STL/blob/cbe2ee99caf122555a305d18f69e57c75b3fe5ec/stl/debugger/STL.natvis#L2014)
use `equal` in this case, so I prefer to keep existing behavior.
https://github.com/llvm/llvm-project/pull/174195
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits