Michael137 updated this revision to Diff 462618.
Michael137 added a comment.
- Fix breakpoint and move docstring
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134573/new/
https://reviews.llvm.org/D134573
Files:
lldb/test/API/lang/cpp/gmodules/templates/Makefile
lldb/test/API/lang/cpp/gmodules/templates/TestGModules.py
lldb/test/API/lang/cpp/gmodules/templates/main.cpp
Index: lldb/test/API/lang/cpp/gmodules/templates/main.cpp
===================================================================
--- lldb/test/API/lang/cpp/gmodules/templates/main.cpp
+++ lldb/test/API/lang/cpp/gmodules/templates/main.cpp
@@ -1,9 +1,9 @@
#include "b.h"
+#include <cstdio>
int main(int argc, const char * argv[])
{
Module m;
- // Test that the type Module which contains a field that is a
- // template instantiation can be fully resolved.
- return 0; //%
self.assertTrue(self.frame().FindVariable('m').GetChildAtIndex(0).GetChildAtIndex(0).GetChildAtIndex(0).GetName()
== 'buffer', 'find template specializations in imported modules')
+ std::puts("Break here");
+ return 0;
}
Index: lldb/test/API/lang/cpp/gmodules/templates/TestGModules.py
===================================================================
--- lldb/test/API/lang/cpp/gmodules/templates/TestGModules.py
+++ lldb/test/API/lang/cpp/gmodules/templates/TestGModules.py
@@ -1,6 +1,22 @@
-import lldbsuite.test.lldbinline as lldbinline
+"""
+Test that the type Module which contains a field that is a
+template instantiation can be fully resolved.
+"""
+
+import lldb
from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestGModules(TestBase):
+
+ @add_test_categories(["gmodules"])
+ @expectedFailureAll
+ def test_gmodules(self):
+ self.build()
+ lldbutil.run_to_source_breakpoint(self, "Break here",
lldb.SBFileSpec("main.cpp"))
+
+ name = lldbutil.frame().FindVariable('m') \
+
.GetChildAtIndex(0).GetChildAtIndex(0).GetChildAtIndex(0).GetName()
-lldbinline.MakeInlineTest(__file__, globals(), [
- expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr36107",
- debug_info="gmodules")])
+ self.assertEqual(name, 'buffer', 'find template specializations in
imported modules')
Index: lldb/test/API/lang/cpp/gmodules/templates/Makefile
===================================================================
--- /dev/null
+++ lldb/test/API/lang/cpp/gmodules/templates/Makefile
@@ -0,0 +1,4 @@
+PCH_CXX_SOURCES = a.h b.h
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
Index: lldb/test/API/lang/cpp/gmodules/templates/main.cpp
===================================================================
--- lldb/test/API/lang/cpp/gmodules/templates/main.cpp
+++ lldb/test/API/lang/cpp/gmodules/templates/main.cpp
@@ -1,9 +1,9 @@
#include "b.h"
+#include <cstdio>
int main(int argc, const char * argv[])
{
Module m;
- // Test that the type Module which contains a field that is a
- // template instantiation can be fully resolved.
- return 0; //% self.assertTrue(self.frame().FindVariable('m').GetChildAtIndex(0).GetChildAtIndex(0).GetChildAtIndex(0).GetName() == 'buffer', 'find template specializations in imported modules')
+ std::puts("Break here");
+ return 0;
}
Index: lldb/test/API/lang/cpp/gmodules/templates/TestGModules.py
===================================================================
--- lldb/test/API/lang/cpp/gmodules/templates/TestGModules.py
+++ lldb/test/API/lang/cpp/gmodules/templates/TestGModules.py
@@ -1,6 +1,22 @@
-import lldbsuite.test.lldbinline as lldbinline
+"""
+Test that the type Module which contains a field that is a
+template instantiation can be fully resolved.
+"""
+
+import lldb
from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestGModules(TestBase):
+
+ @add_test_categories(["gmodules"])
+ @expectedFailureAll
+ def test_gmodules(self):
+ self.build()
+ lldbutil.run_to_source_breakpoint(self, "Break here", lldb.SBFileSpec("main.cpp"))
+
+ name = lldbutil.frame().FindVariable('m') \
+ .GetChildAtIndex(0).GetChildAtIndex(0).GetChildAtIndex(0).GetName()
-lldbinline.MakeInlineTest(__file__, globals(), [
- expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr36107",
- debug_info="gmodules")])
+ self.assertEqual(name, 'buffer', 'find template specializations in imported modules')
Index: lldb/test/API/lang/cpp/gmodules/templates/Makefile
===================================================================
--- /dev/null
+++ lldb/test/API/lang/cpp/gmodules/templates/Makefile
@@ -0,0 +1,4 @@
+PCH_CXX_SOURCES = a.h b.h
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits