[Lldb-commits] [lldb] [lldb][test] Add libcxx-simulators test for std::optional (PR #111133)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 4 04:03:04 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 19c6958d24acf5beaba1946ad3e1e5fc538e3a2d...d4e8921f4e00351c2906b08d2c2a1e9a4191c40e lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/optional/TestDataFormatterLibcxxOptionalSimulator.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- TestDataFormatterLibcxxOptionalSimulator.py 2024-10-04 10:57:55.000000 +0000
+++ TestDataFormatterLibcxxOptionalSimulator.py 2024-10-04 11:02:36.581616 +0000
@@ -17,24 +17,36 @@
cxxflags_extras = " ".join(["-D%s" % d for d in defines])
self.build(dictionary=dict(CXXFLAGS_EXTRAS=cxxflags_extras))
lldbutil.run_to_source_breakpoint(
self, "Break here", lldb.SBFileSpec("main.cpp")
)
- self.expect_var_path("maybe_int", summary=' Has Value=true ',
- children=[ValueCheck(name="Value", summary=None, value="42")])
- self.expect_var_path("maybe_string", summary=' Has Value=true ',
- children=[ValueCheck(name="Value", summary='"Hello"')])
+ self.expect_var_path(
+ "maybe_int",
+ summary=" Has Value=true ",
+ children=[ValueCheck(name="Value", summary=None, value="42")],
+ )
+ self.expect_var_path(
+ "maybe_string",
+ summary=" Has Value=true ",
+ children=[ValueCheck(name="Value", summary='"Hello"')],
+ )
- self.expect_expr("maybe_int", result_summary=' Has Value=true ',
- result_children=[ValueCheck(name="Value", summary=None, value="42")])
+ self.expect_expr(
+ "maybe_int",
+ result_summary=" Has Value=true ",
+ result_children=[ValueCheck(name="Value", summary=None, value="42")],
+ )
- self.expect_expr("maybe_string", result_summary=' Has Value=true ',
- result_children=[ValueCheck(name="Value", summary='"Hello"')])
+ self.expect_expr(
+ "maybe_string",
+ result_summary=" Has Value=true ",
+ result_children=[ValueCheck(name="Value", summary='"Hello"')],
+ )
for r in range(2):
- name = f'test_r{r}'
- defines = [f'REVISION={r}']
+ name = f"test_r{r}"
+ defines = [f"REVISION={r}"]
f = functools.partialmethod(
LibcxxOptionalDataFormatterSimulatorTestCase._run_test, defines
)
setattr(LibcxxOptionalDataFormatterSimulatorTestCase, name, f)
``````````
</details>
https://github.com/llvm/llvm-project/pull/111133
More information about the lldb-commits
mailing list