@@ -30,7 +30,7 @@ final class FunctionLoweringTests {
30
30
f(x: x, y: y, z: UnsafeBufferPointer<Bool>(start: z_pointer.assumingMemoryBound(to: Bool.self), count: z_count))
31
31
}
32
32
""" ,
33
- expectedCFunction: " void c_f(ptrdiff_t x, float y, void const *z_pointer, ptrdiff_t z_count) "
33
+ expectedCFunction: " void c_f(ptrdiff_t x, float y, const void *z_pointer, ptrdiff_t z_count) "
34
34
)
35
35
}
36
36
@@ -45,7 +45,7 @@ final class FunctionLoweringTests {
45
45
return f(t: (t_0, (t_1_0, t_1_1)), z: z_pointer.assumingMemoryBound(to: Int.self))
46
46
}
47
47
""" ,
48
- expectedCFunction: " ptrdiff_t c_f(ptrdiff_t t_0, float t_1_0, double t_1_1, void const *z_pointer) "
48
+ expectedCFunction: " ptrdiff_t c_f(ptrdiff_t t_0, float t_1_0, double t_1_1, const void *z_pointer) "
49
49
)
50
50
}
51
51
@@ -82,7 +82,7 @@ final class FunctionLoweringTests {
82
82
_result.assumingMemoryBound(to: Point.self).initialize(to: self.assumingMemoryBound(to: Point.self).pointee.shifted(by: (delta_0, delta_1)))
83
83
}
84
84
""" ,
85
- expectedCFunction: " void c_shifted(double delta_0, double delta_1, void const *self, void *_result) "
85
+ expectedCFunction: " void c_shifted(double delta_0, double delta_1, const void *self, void *_result) "
86
86
)
87
87
}
88
88
@@ -120,7 +120,7 @@ final class FunctionLoweringTests {
120
120
unsafeBitCast(self, to: Point.self).shift(by: (delta_0, delta_1))
121
121
}
122
122
""" ,
123
- expectedCFunction: " void c_shift(double delta_0, double delta_1, void const *self) "
123
+ expectedCFunction: " void c_shift(double delta_0, double delta_1, const void *self) "
124
124
)
125
125
}
126
126
@@ -155,7 +155,7 @@ final class FunctionLoweringTests {
155
155
return unsafeBitCast(Person.randomPerson(seed: seed), to: UnsafeRawPointer.self)
156
156
}
157
157
""" ,
158
- expectedCFunction: " void const *c_randomPerson(double seed)"
158
+ expectedCFunction: " const void *c_randomPerson(double seed) "
159
159
)
160
160
}
161
161
@@ -190,7 +190,7 @@ final class FunctionLoweringTests {
190
190
return unsafeBitCast(Person(seed: seed), to: UnsafeRawPointer.self)
191
191
}
192
192
""" ,
193
- expectedCFunction: " void const *c_init(double seed)"
193
+ expectedCFunction: " const void *c_init(double seed) "
194
194
)
195
195
}
196
196
@@ -205,7 +205,7 @@ final class FunctionLoweringTests {
205
205
f(t: unsafeBitCast(t, to: Int.self))
206
206
}
207
207
""" ,
208
- expectedCFunction: " void c_f(void const *t) "
208
+ expectedCFunction: " void c_f(const void *t) "
209
209
)
210
210
211
211
try assertLoweredFunction ( """
@@ -217,7 +217,7 @@ final class FunctionLoweringTests {
217
217
return unsafeBitCast(f(), to: UnsafeRawPointer.self)
218
218
}
219
219
""" ,
220
- expectedCFunction: " void const *c_f(void)"
220
+ expectedCFunction: " const void *c_f(void) "
221
221
)
222
222
}
223
223
@@ -236,7 +236,7 @@ final class FunctionLoweringTests {
236
236
return unsafeBitCast(unsafeBitCast(self, to: Point.self).shifted(by: (delta_0, delta_1)), to: UnsafeRawPointer.self)
237
237
}
238
238
""" ,
239
- expectedCFunction: " void const *c_shifted(double delta_0, double delta_1, void const *self)"
239
+ expectedCFunction: " const void *c_shifted(double delta_0, double delta_1, const void *self) "
240
240
)
241
241
}
242
242
@@ -254,7 +254,7 @@ final class FunctionLoweringTests {
254
254
return UnsafeRawPointer(getPointer())
255
255
}
256
256
""" ,
257
- expectedCFunction: " void const *c_getPointer(void)"
257
+ expectedCFunction: " const void *c_getPointer(void) "
258
258
)
259
259
}
260
260
0 commit comments