File tree Expand file tree Collapse file tree 4 files changed +42
-0
lines changed
lldb/test/API/lang/swift/stdlib/ContiguousArray Expand file tree Collapse file tree 4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ SWIFT_SOURCES := main.swift
2
+
3
+ include Makefile.rules
Original file line number Diff line number Diff line change
1
+ """
2
+ Test that contiguous array prints correctly
3
+ """
4
+ import lldb
5
+ from lldbsuite .test .decorators import *
6
+ import lldbsuite .test .lldbtest as lldbtest
7
+ import lldbsuite .test .lldbutil as lldbutil
8
+ import os
9
+ import unittest2
10
+
11
+
12
+ class TestContiguousArray (lldbtest .TestBase ):
13
+
14
+ mydir = lldbtest .TestBase .compute_mydir (__file__ )
15
+
16
+ @swiftTest
17
+ def test_frame_contiguous_array (self ):
18
+ """Test that contiguous array prints correctly"""
19
+ self .build ()
20
+ lldbutil .run_to_source_breakpoint (
21
+ self , 'Set breakpoint here' , lldb .SBFileSpec ('main.swift' ))
22
+
23
+ self .expect ("frame variable --dynamic-type run-target" ,
24
+ startstr = """(ContiguousArray<a.Class>) array = {
25
+ _buffer = {
26
+ _storage = 1 value {
27
+ [0] = 0x""" )
28
+
Original file line number Diff line number Diff line change
1
+ class Class { }
2
+
3
+ func use< T> ( _ t: T ) { }
4
+
5
+ func main( ) {
6
+ let array = ContiguousArray < Class > ( [ Class ( ) ] )
7
+ use ( array) // Set breakpoint here
8
+ }
9
+
10
+ main ( )
11
+
You can’t perform that action at this time.
0 commit comments