File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ import XCTest
2+ import WasmKit
3+
4+ final class FuzzTranslatorRegressionTests : XCTestCase {
5+ func testRunAll( ) async throws {
6+ let failCasesDir = URL ( fileURLWithPath: #filePath)
7+ . deletingLastPathComponent ( ) . deletingLastPathComponent ( ) . deletingLastPathComponent ( )
8+ . appendingPathComponent ( " FuzzTesting/FailCases/FuzzTranslator " )
9+
10+ for file in try FileManager . default. contentsOfDirectory ( atPath: failCasesDir. path) {
11+ let path = failCasesDir. appendingPathComponent ( file) . path
12+ print ( " Fuzz regression test: \( path) " )
13+
14+ let data = try Data ( contentsOf: URL ( fileURLWithPath: path) )
15+ do {
16+ var module = try WasmKit . parseWasm ( bytes: Array ( data) )
17+ try module. materializeAll ( )
18+ } catch {
19+ // Explicit errors are ok
20+ }
21+ }
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments