[Lldb-commits] [lldb] 048d11d - [lldb][NFC] Make TestDollarInVariable a non-inline test
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 26 03:57:15 PDT 2020
Author: Raphael Isemann
Date: 2020-06-26T12:56:22+02:00
New Revision: 048d11de43be087fd2fa0c5e35f20486f6094c29
URL: https://github.com/llvm/llvm-project/commit/048d11de43be087fd2fa0c5e35f20486f6094c29
DIFF: https://github.com/llvm/llvm-project/commit/048d11de43be087fd2fa0c5e35f20486f6094c29.diff
LOG: [lldb][NFC] Make TestDollarInVariable a non-inline test
Added:
lldb/test/API/commands/expression/dollar-in-variable/Makefile
Modified:
lldb/test/API/commands/expression/dollar-in-variable/TestDollarInVariable.py
lldb/test/API/commands/expression/dollar-in-variable/main.c
Removed:
################################################################################
diff --git a/lldb/test/API/commands/expression/dollar-in-variable/Makefile b/lldb/test/API/commands/expression/dollar-in-variable/Makefile
new file mode 100644
index 000000000000..10495940055b
--- /dev/null
+++ b/lldb/test/API/commands/expression/dollar-in-variable/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/lldb/test/API/commands/expression/dollar-in-variable/TestDollarInVariable.py b/lldb/test/API/commands/expression/dollar-in-variable/TestDollarInVariable.py
index 7458867527df..13d70597aee1 100644
--- a/lldb/test/API/commands/expression/dollar-in-variable/TestDollarInVariable.py
+++ b/lldb/test/API/commands/expression/dollar-in-variable/TestDollarInVariable.py
@@ -1,5 +1,18 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
-lldbinline.MakeInlineTest(__file__, globals(),
- [lldbinline.expectedFailureAll(oslist=["windows"])])
+class TestCase(TestBase):
+
+ mydir = TestBase.compute_mydir(__file__)
+
+ def test(self):
+ self.build()
+ lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.c"))
+
+ self.expect_expr("$__lldb_expr_result", result_type="int", result_value="11")
+ self.expect_expr("$foo", result_type="int", result_value="12")
+ self.expect_expr("$R0", result_type="int", result_value="13")
+ self.expect("expr int $foo = 123", error=True, substrs=["declaration conflicts"])
+ self.expect_expr("$0", result_type="int", result_value="11")
diff --git a/lldb/test/API/commands/expression/dollar-in-variable/main.c b/lldb/test/API/commands/expression/dollar-in-variable/main.c
index 7d2a048720bd..d1a16a7b88dd 100644
--- a/lldb/test/API/commands/expression/dollar-in-variable/main.c
+++ b/lldb/test/API/commands/expression/dollar-in-variable/main.c
@@ -13,10 +13,5 @@ int main() {
int $R0 = 13;
int $0 = 14;
- //%self.expect_expr("$__lldb_expr_result", result_type="int", result_value="11")
- //%self.expect_expr("$foo", result_type="int", result_value="12")
- //%self.expect_expr("$R0", result_type="int", result_value="13")
- //%self.expect("expr int $foo = 123", error=True, substrs=["declaration conflicts"])
- //%self.expect_expr("$0", result_type="int", result_value="11")
- return 0;
+ return 0; // break here
}
More information about the lldb-commits
mailing list