[Lldb-commits] [lldb] ff95486 - [lldb][NFC] Remove sample test boilerplate from TestBreakOnCPP11Initializers
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Wed May 19 06:22:31 PDT 2021
Author: Raphael Isemann
Date: 2021-05-19T15:22:11+02:00
New Revision: ff954865137cdd11165340e2c9537cfd1b3f805d
URL: https://github.com/llvm/llvm-project/commit/ff954865137cdd11165340e2c9537cfd1b3f805d
DIFF: https://github.com/llvm/llvm-project/commit/ff954865137cdd11165340e2c9537cfd1b3f805d.diff
LOG: [lldb][NFC] Remove sample test boilerplate from TestBreakOnCPP11Initializers
Added:
Modified:
lldb/test/API/lang/cpp/break-on-initializers/TestBreakOnCPP11Initializers.py
lldb/test/API/lang/cpp/break-on-initializers/main.cpp
Removed:
################################################################################
diff --git a/lldb/test/API/lang/cpp/break-on-initializers/TestBreakOnCPP11Initializers.py b/lldb/test/API/lang/cpp/break-on-initializers/TestBreakOnCPP11Initializers.py
index 8456a7cae96e4..46846b49bb386 100644
--- a/lldb/test/API/lang/cpp/break-on-initializers/TestBreakOnCPP11Initializers.py
+++ b/lldb/test/API/lang/cpp/break-on-initializers/TestBreakOnCPP11Initializers.py
@@ -13,7 +13,7 @@
from lldbsuite.test.lldbtest import *
-class RenameThisSampleTestTestCase(TestBase):
+class TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@@ -24,16 +24,6 @@ def test_breakpoints_on_initializers(self):
self.main_source_file = lldb.SBFileSpec("main.cpp")
self.first_initializer_line = line_number("main.cpp", "Set the before constructor breakpoint here")
self.second_initializer_line = line_number("main.cpp", "Set the after constructor breakpoint here")
- self.sample_test()
-
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
- # Set up your test case here. If your test doesn't need any set up then
- # remove this method from your TestCase class.
-
- def sample_test(self):
- """You might use the test implementation in several ways, say so here."""
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
" Set a breakpoint here to get started", self.main_source_file)
diff --git a/lldb/test/API/lang/cpp/break-on-initializers/main.cpp b/lldb/test/API/lang/cpp/break-on-initializers/main.cpp
index 13117a17940d5..a661b2fd69511 100644
--- a/lldb/test/API/lang/cpp/break-on-initializers/main.cpp
+++ b/lldb/test/API/lang/cpp/break-on-initializers/main.cpp
@@ -1,12 +1,8 @@
-#include <stdio.h>
-#include <vector>
-
class Trivial {
public:
Trivial(int input) : m_int(input) {}
private:
int m_int;
-
};
class Foo {
@@ -15,17 +11,14 @@ class Foo {
public:
Foo(int input) {
- printf("I have been made!\n");
+ ++input;
}
private:
Trivial m_other_trivial = Trivial(200); // Set the after constructor breakpoint here
};
-int
-main()
-{
+int main() {
Foo myFoo(10); // Set a breakpoint here to get started
return 0;
}
-
More information about the lldb-commits
mailing list