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 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) 17 18 line = line_number('main.cpp', '// breakpoint 1') 19 lldbutil.run_break_set_by_file_and_line( 20 self, "main.cpp", line, num_expected_locations=-1, loc_exact=False) 21 22 self.runCmd("process launch", RUN_SUCCEEDED) 23 24 self.expect_expr("bool second_bool = my_bool; second_bool", result_type="bool", result_value="false") 25 self.expect_expr("my_bool = true", result_type="bool", result_value="true") 26