diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 18:01:57 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 18:01:57 +0000 | 
| commit | 88c643b6fec27eec436c8d138fee6346e92337d6 (patch) | |
| tree | 82cd13b2f3cde1c9e5f79689ba4e6ba67694843f /packages/Python/lldbsuite/test/lang/cpp/chained-calls | |
| parent | 94994d372d014ce4c8758b9605d63fae651bd8aa (diff) | |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/cpp/chained-calls')
3 files changed, 0 insertions, 137 deletions
| diff --git a/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile b/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile deleted file mode 100644 index 314f1cb2f077..000000000000 --- a/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make - -CXX_SOURCES := main.cpp - -include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py b/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py deleted file mode 100644 index 080c051de98f..000000000000 --- a/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py +++ /dev/null @@ -1,99 +0,0 @@ -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class TestCppChainedCalls(TestBase): - -    mydir = TestBase.compute_mydir(__file__) - -    def test_with_run_command(self): -        self.build() - -        # Get main source file -        src_file = "main.cpp" -        src_file_spec = lldb.SBFileSpec(src_file) -        self.assertTrue(src_file_spec.IsValid(), "Main source file") - -        # Get the path of the executable -        exe_path = self.getBuildArtifact("a.out") - -        # Load the executable -        target = self.dbg.CreateTarget(exe_path) -        self.assertTrue(target.IsValid(), VALID_TARGET) - -        # Break on main function -        main_breakpoint = target.BreakpointCreateBySourceRegex( -            "break here", src_file_spec) -        self.assertTrue( -            main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1, -            VALID_BREAKPOINT) - -        # Launch the process -        args = None -        env = None -        process = target.LaunchSimple( -            args, env, self.get_process_working_directory()) -        self.assertTrue(process.IsValid(), PROCESS_IS_VALID) - -        # Get the thread of the process -        self.assertTrue( -            process.GetState() == lldb.eStateStopped, -            PROCESS_STOPPED) -        thread = lldbutil.get_stopped_thread( -            process, lldb.eStopReasonBreakpoint) - -        # Get frame for current thread -        frame = thread.GetSelectedFrame() - -        # Test chained calls -        test_result = frame.EvaluateExpression("get(set(true))") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "true", -            "get(set(true)) = true") - -        test_result = frame.EvaluateExpression("get(set(false))") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "false", -            "get(set(false)) = false") - -        test_result = frame.EvaluateExpression("get(t & f)") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "false", -            "get(t & f) = false") - -        test_result = frame.EvaluateExpression("get(f & t)") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "false", -            "get(f & t) = false") - -        test_result = frame.EvaluateExpression("get(t & t)") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "true", -            "get(t & t) = true") - -        test_result = frame.EvaluateExpression("get(f & f)") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "false", -            "get(f & f) = false") - -        test_result = frame.EvaluateExpression("get(t & f)") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "false", -            "get(t & f) = false") - -        test_result = frame.EvaluateExpression("get(f) && get(t)") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "false", -            "get(f) && get(t) = false") - -        test_result = frame.EvaluateExpression("get(f) && get(f)") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "false", -            "get(f) && get(t) = false") - -        test_result = frame.EvaluateExpression("get(t) && get(t)") -        self.assertTrue( -            test_result.IsValid() and test_result.GetValue() == "true", -            "get(t) && get(t) = true") diff --git a/packages/Python/lldbsuite/test/lang/cpp/chained-calls/main.cpp b/packages/Python/lldbsuite/test/lang/cpp/chained-calls/main.cpp deleted file mode 100644 index a888c3f6c557..000000000000 --- a/packages/Python/lldbsuite/test/lang/cpp/chained-calls/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -class Bool { -public: -    Bool operator&(const Bool other) -    { -        Bool result; -        result.value = value && other.value; -        return result; -    } - -    bool value; -}; - -bool get(Bool object) -{ -    return object.value; -} - -Bool set(bool value) -{ -    Bool result; -    result.value = value; -    return result; -} - -int main() -{ -    Bool t = set(true); -    Bool f = set(false); -    get(t); -    get(f); -    get(t & f); -    return 0; // break here -} | 
