Skip to content

Commit 5236224

Browse files
committed
[test] Disable allocator-specific test portion
Disagble a portion of a test with hard-coded assumptions about the result of malloc_size.
1 parent fd468d0 commit 5236224

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

test/stdlib/NewStringAppending.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,18 @@ print("\(repr(s))")
117117
// CHECK-LABEL: (expecting third reallocation)
118118
print("(expecting third reallocation)")
119119

120-
// CHECK-NEXT: String(Native(owner: @[[storage3:[x0-9a-f]+]], count: 72, capacity: 135))
121-
// CHECK-NOT: @[[storage2]],
120+
// FIXME: Now that test behavior depends on result of malloc_size, we should
121+
// rewrite this test for larger allocations. For now, disable the hard-coded
122+
// checks.
123+
124+
// xCHECK-NEXT: String(Native(owner: @[[storage3:[x0-9a-f]+]], count: 72, capacity: 135))
125+
// xCHECK-NOT: @[[storage2]],
122126
s += "1234567890123456"
123127
print("\(repr(s))")
124128

125129
var s1 = s
126130

127-
// CHECK-NEXT: String(Native(owner: @[[storage3]], count: 72, capacity: 135))
131+
// xCHECK-NEXT: String(Native(owner: @[[storage3]], count: 72, capacity: 135))
128132
print("\(repr(s1))")
129133

130134
/// The use of later buffer capacity by another string forces
@@ -133,19 +137,19 @@ print("\(repr(s1))")
133137
// CHECK-LABEL: (expect copy to trigger reallocation without growth)
134138
print("(expect copy to trigger reallocation without growth)")
135139

136-
// CHECK-NEXT: String(Native(owner: @[[storage4:[x0-9a-f]+]], count: 73, capacity: 87)) = "{{.*}}X"
140+
// CHECK-NEXT: String(Native(owner: @[[storage4:[x0-9a-f]+]], count: 73, capacity: 87)) = "{{.*}}X"
137141
// CHECK-NOT: @[[storage3]],
138142
s1 += "X"
139143
print("\(repr(s1))")
140144

141145
/// The original copy is left unchanged
142146

143-
// CHECK-NEXT: String(Native(owner: @[[storage3]], count: 72, capacity: 135))
147+
// xCHECK-NEXT: String(Native(owner: @[[storage3]], count: 72, capacity: 135))
144148
print("\(repr(s))")
145149

146150
/// Appending to an empty string re-uses the RHS
147151

148-
// CHECK-NEXT: @[[storage3]],
152+
// xCHECK-NEXT: @[[storage3]],
149153
var s2 = String()
150154
s2 += s
151155
print("\(repr(s2))")

0 commit comments

Comments
 (0)