@@ -164,6 +164,7 @@ private func functionTestThunk(
164
164
let invocation = castToInvocation ( fromOpaquePointer: erasedInvocation)
165
165
let context = FunctionPassContext ( _bridged: BridgedPassContext ( invocation: passInvocation. invocation) )
166
166
invocation ( function. function, arguments. native, context)
167
+ fflush ( stdout)
167
168
}
168
169
169
170
/// Bitcast a thin test closure to void *.
@@ -202,46 +203,36 @@ private func castToInvocation(fromOpaquePointer erasedInvocation: UnsafeMutableR
202
203
// - something to identify the instance (mostly this means calling dump)
203
204
let parseTestSpecificationTest =
204
205
FunctionTest ( name: " test_specification_parsing " ) { function, arguments, context in
205
- struct _Stderr : TextOutputStream {
206
- public init ( ) { }
207
-
208
- public mutating func write( _ string: String ) {
209
- for c in string. utf8 {
210
- writeCharToStderr ( CInt ( c) )
211
- }
212
- }
213
- }
214
- var stderr = _Stderr ( )
215
206
let expectedFields = arguments. takeString ( )
216
207
for expectedField in expectedFields. string {
217
208
switch expectedField {
218
209
case " A " :
219
210
let argument = arguments. takeArgument ( )
220
- print ( " argument: \n \( argument) " , to : & stderr )
211
+ print ( " argument: \n \( argument) " )
221
212
case " F " :
222
213
let function = arguments. takeFunction ( )
223
- print ( " function: \( function. name) " , to : & stderr )
214
+ print ( " function: \( function. name) " )
224
215
case " B " :
225
216
let block = arguments. takeBlock ( )
226
- print ( " block: \n \( block) " , to : & stderr )
217
+ print ( " block: \n \( block) " )
227
218
case " I " :
228
219
let instruction = arguments. takeInstruction ( )
229
- print ( " instruction: \( instruction) " , to : & stderr )
220
+ print ( " instruction: \( instruction) " )
230
221
case " V " :
231
222
let value = arguments. takeValue ( )
232
- print ( " value: \( value) " , to : & stderr )
223
+ print ( " value: \( value) " )
233
224
case " O " :
234
225
let operand = arguments. takeOperand ( )
235
- print ( " operand: \( operand) " , to : & stderr )
226
+ print ( " operand: \( operand) " )
236
227
case " u " :
237
228
let u = arguments. takeInt ( )
238
- print ( " uint: \( u) " , to : & stderr )
229
+ print ( " uint: \( u) " )
239
230
case " b " :
240
231
let b = arguments. takeBool ( )
241
- print ( " bool: \( b) " , to : & stderr )
232
+ print ( " bool: \( b) " )
242
233
case " s " :
243
234
let s = arguments. takeString ( )
244
- print ( " string: \( s) " , to : & stderr )
235
+ print ( " string: \( s) " )
245
236
default :
246
237
fatalError ( " unknown field type was expected?! " ) ;
247
238
}
0 commit comments