1"""
2Tests that bool types work
3"""
4import lldb
5from lldbsuite.test.lldbtest import *
6import lldbsuite.test.lldbutil as lldbutil
7
8
9class CPPBoolTestCase(TestBase):
10
11    mydir = TestBase.compute_mydir(__file__)
12
13    def test_with_run_command(self):
14        """Test that bool types work in the expression parser"""
15        self.build()
16        lldbutil.run_to_source_breakpoint(self, "// breakpoint 1", lldb.SBFileSpec("main.cpp"))
17
18        self.expect_expr("bool second_bool = my_bool; second_bool", result_type="bool", result_value="false")
19        self.expect_expr("my_bool = true", result_type="bool", result_value="true")
20