We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ee73a6 commit dcc2186Copy full SHA for dcc2186
Tests/JSONLoggerTests/PipeHelper.swift
@@ -6,13 +6,17 @@ import WASILibc
6
7
typealias Pipe = FakePipe
8
/* We create a fake pipe on WASI as creating a pipe is not possible. */
9
-struct FakePipe {
+final class FakePipe {
10
11
init() {
12
try! Data().write(to: fileURL)
13
assert(FileManager.default.fileExists(atPath: fileURL.absoluteURL.path), "Created file does not exist!")
14
}
15
16
+ deinit {
17
+ _ = try? FileManager.default.removeItem(at: fileURL)
18
+ }
19
+
20
var fileHandleForWriting: FileHandle {
21
return try! FileHandle(forWritingTo: fileURL)
22
0 commit comments