You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for this test to pass. Your test functions should all start with <code>test</code>, please see <ahref="https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods">XCTest
199
199
documentation</a>
200
200
for more details.</p>
201
-
<h2><aclass="header" href="#xctest-limitations-in-the-swiftwasm-toolchain" id="xctest-limitations-in-the-swiftwasm-toolchain">XCTest limitations in the SwiftWasm toolchain</a></h2>
202
-
<p>As was mentioned in <ahref="/foundation.html">our section about Swift Foundation</a>, multi-threading and
203
-
file system APIs are currently not available in SwiftWasm. This means that <code>XCTestExpectation</code>
204
-
and test hooks related to <code>Bundle</code> (such as <code>testBundleWillStart(_:)</code> and <code>testBundleDidFinish(_:)</code>)
205
-
are not available in test suites compiled with SwiftWasm. If you have an existing test suite you're
206
-
porting to WebAssembly, you should use <code>#if os(WASI)</code> directives to exclude places where you use
207
-
these APIs from compilation.</p>
208
201
<h2><aclass="header" href="#building-and-running-the-test-suite-with-swiftpm" id="building-and-running-the-test-suite-with-swiftpm">Building and running the test suite with <code>SwiftPM</code></a></h2>
209
202
<p>You can build your test suite by running this command in your terminal:</p>
210
203
<pre><codeclass="language-sh">$ swift build --build-tests --triple wasm32-unknown-wasi
for this test to pass. Your test functions should all start with <code>test</code>, please see <ahref="https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods">XCTest
631
643
documentation</a>
632
644
for more details.</p>
633
-
<h2><aclass="header" href="#xctest-limitations-in-the-swiftwasm-toolchain" id="xctest-limitations-in-the-swiftwasm-toolchain">XCTest limitations in the SwiftWasm toolchain</a></h2>
634
-
<p>As was mentioned in <ahref="getting-started//foundation.html">our section about Swift Foundation</a>, multi-threading and
635
-
file system APIs are currently not available in SwiftWasm. This means that <code>XCTestExpectation</code>
636
-
and test hooks related to <code>Bundle</code> (such as <code>testBundleWillStart(_:)</code> and <code>testBundleDidFinish(_:)</code>)
637
-
are not available in test suites compiled with SwiftWasm. If you have an existing test suite you're
638
-
porting to WebAssembly, you should use <code>#if os(WASI)</code> directives to exclude places where you use
639
-
these APIs from compilation.</p>
640
645
<h2><aclass="header" href="#building-and-running-the-test-suite-with-swiftpm" id="building-and-running-the-test-suite-with-swiftpm">Building and running the test suite with <code>SwiftPM</code></a></h2>
641
646
<p>You can build your test suite by running this command in your terminal:</p>
642
647
<pre><codeclass="language-sh">$ swift build --build-tests --triple wasm32-unknown-wasi
0 commit comments