def test_swift_nested_array(self):
        """Test Arrays of Arrays in Swift"""
        self.build()
        lldbutil.run_to_source_breakpoint(self, 'break here',
                                          lldb.SBFileSpec('main.swift'))

        var_aInt = self.frame().FindVariable("aInt")
        var_aC = self.frame().FindVariable("aC")
        lldbutil.check_variable(self, var_aInt, False, num_children=6)
        lldbutil.check_variable(self, var_aC, False, num_children=5)

        for i in range(0, 6):
            var_aIntChild = var_aInt.GetChildAtIndex(i)
            lldbutil.check_children(self, var_aIntChild, check_for_idx)

        for i in range(0, 5):
            var_aCChild = var_aC.GetChildAtIndex(i)
            lldbutil.check_children(self, var_aCChild, check_for_C)
    def do_test(self):
        """Test Arrays of Arrays in Swift"""
        exe_name = "a.out"
        exe = os.path.join(os.getcwd(), exe_name)

        # Create the target
        target = self.dbg.CreateTarget(exe)
        self.assertTrue(target, VALID_TARGET)

        # Set the breakpoints
        breakpoint = target.BreakpointCreateBySourceRegex(
            '// break here', self.main_source_spec)
        self.assertTrue(breakpoint.GetNumLocations() > 0, VALID_BREAKPOINT)

        # Launch the process, and do not stop at the entry point.
        process = target.LaunchSimple(None, None, os.getcwd())

        self.assertTrue(process, PROCESS_IS_VALID)

        # Frame #0 should be at our breakpoint.
        threads = lldbutil.get_threads_stopped_at_breakpoint(
            process, breakpoint)

        self.assertTrue(len(threads) == 1)
        self.thread = threads[0]
        self.frame = self.thread.frames[0]
        self.assertTrue(self.frame, "Frame 0 is valid.")

        var_aInt = self.frame.FindVariable("aInt")
        var_aC = self.frame.FindVariable("aC")
        lldbutil.check_variable(self, var_aInt, False, num_children=6)
        lldbutil.check_variable(self, var_aC, False, num_children=5)

        for i in range(0, 6):
            var_aIntChild = var_aInt.GetChildAtIndex(i)
            lldbutil.check_children(self, var_aIntChild, check_for_idx)

        for i in range(0, 5):
            var_aCChild = var_aC.GetChildAtIndex(i)
            lldbutil.check_children(self, var_aCChild, check_for_C)