@@ -39,7 +39,7 @@ func testForOutputRegex(program: String, runner: JavaScriptExecutor, outputPatte
39
39
40
40
func testForErrorOutput( program: String , runner: JavaScriptExecutor , errorMessageContains errormsg: String ) {
41
41
let result = testExecuteScript ( program: program, runner: runner)
42
- XCTAssert ( result. output. contains ( errormsg) , " Error messages don't match, got: \n " + result. output)
42
+ XCTAssert ( result. output. contains ( errormsg) || result . error . contains ( errormsg ) , " Error messages don't match, got stdout : \n \( result. output) \n stderr: \n \( result . error ) " )
43
43
}
44
44
45
45
class WasmSignatureConversionTests : XCTestCase {
@@ -487,7 +487,7 @@ class WasmFoundationTests: XCTestCase {
487
487
}
488
488
489
489
func testGlobalExnRef( ) throws {
490
- let runner = try GetJavaScriptExecutorOrSkipTest ( type: . user , withArguments: [ " --experimental-wasm-exnref " ] )
490
+ let runner = try GetJavaScriptExecutorOrSkipTest ( type: . any , withArguments: [ " --experimental-wasm-exnref " ] )
491
491
let liveTestConfig = Configuration ( logLevel: . error, enableInspection: true )
492
492
493
493
let fuzzer = makeMockFuzzer ( config: liveTestConfig, environment: JavaScriptEnvironment ( ) )
@@ -1021,7 +1021,7 @@ class WasmFoundationTests: XCTestCase {
1021
1021
let wasmFunction = b. getProperty ( module. getExportedMethod ( at: 1 ) , of: exports)
1022
1022
let result = b. callFunction ( wasmFunction, withArgs: [ b. loadInt ( 42 ) ] )
1023
1023
let outputFunc = b. createNamedVariable ( forBuiltin: " output " )
1024
- b. callFunction ( outputFunc, withArgs: [ result] )
1024
+ b. callFunction ( outputFunc, withArgs: [ b . arrayToStringForTesting ( result) ] )
1025
1025
1026
1026
let prog = b. finalize ( )
1027
1027
let jsProg = fuzzer. lifter. lift ( prog)
@@ -2418,7 +2418,7 @@ class WasmFoundationTests: XCTestCase {
2418
2418
}
2419
2419
2420
2420
for (i, _) in testCases. enumerated ( ) {
2421
- let print = b. createNamedVariable ( forBuiltin: " print " )
2421
+ let print = b. createNamedVariable ( forBuiltin: " output " )
2422
2422
let number = b. createNamedVariable ( forBuiltin: " Number " )
2423
2423
2424
2424
let setFormat = b. buildArrowFunction ( with: . parameters( n: 1 ) ) { args in
@@ -3468,7 +3468,7 @@ class WasmFoundationTests: XCTestCase {
3468
3468
}
3469
3469
3470
3470
func testTryTableNoCatch( ) throws {
3471
- let runner = try GetJavaScriptExecutorOrSkipTest ( type: . user , withArguments: [ " --experimental-wasm-exnref " ] )
3471
+ let runner = try GetJavaScriptExecutorOrSkipTest ( type: . any , withArguments: [ " --experimental-wasm-exnref " ] )
3472
3472
let liveTestConfig = Configuration ( logLevel: . error, enableInspection: true )
3473
3473
let fuzzer = makeMockFuzzer ( config: liveTestConfig, environment: JavaScriptEnvironment ( ) )
3474
3474
let b = fuzzer. makeBuilder ( )
@@ -4263,7 +4263,7 @@ class WasmGCTests: XCTestCase {
4263
4263
}
4264
4264
4265
4265
func testRefNullAbstractTypes( ) throws {
4266
- let runner = try GetJavaScriptExecutorOrSkipTest ( )
4266
+ let runner = try GetJavaScriptExecutorOrSkipTest ( type : . any , withArguments : [ " --experimental-wasm-exnref " ] )
4267
4267
let liveTestConfig = Configuration ( logLevel: . error, enableInspection: true )
4268
4268
let fuzzer = makeMockFuzzer ( config: liveTestConfig, environment: JavaScriptEnvironment ( ) )
4269
4269
let b = fuzzer. makeBuilder ( )
@@ -4326,8 +4326,8 @@ class WasmGCTests: XCTestCase {
4326
4326
4327
4327
let positiveResults = b. callMethod ( module. getExportedMethod ( at: 1 ) , on: exports, withArgs: [ positiveI31] )
4328
4328
let negativeResults = b. callMethod ( module. getExportedMethod ( at: 1 ) , on: exports, withArgs: [ negativeI31] )
4329
- b. callFunction ( outputFunc, withArgs: [ positiveResults] )
4330
- b. callFunction ( outputFunc, withArgs: [ negativeResults] )
4329
+ b. callFunction ( outputFunc, withArgs: [ b . arrayToStringForTesting ( positiveResults) ] )
4330
+ b. callFunction ( outputFunc, withArgs: [ b . arrayToStringForTesting ( negativeResults) ] )
4331
4331
4332
4332
let prog = b. finalize ( )
4333
4333
let jsProg = fuzzer. lifter. lift ( prog)
0 commit comments