Skip to content

Commit f92485c

Browse files
committed
Fixes for Linux
1 parent 7d3b712 commit f92485c

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

Sources/ComposableArchitecture/Internal/RuntimeWarnings.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ func runtimeWarning(
4242
)(.fault, rw.dso, rw.log, message, args())
4343
XCTFail(String(format: "\(message)", arguments: args()))
4444
#else
45-
let strMessage = message.withUTF8Buffer {
45+
let strMessage = message().withUTF8Buffer {
4646
String(decoding: $0, as: UTF8.self)
4747
}
48-
print(String(format: strMessage, arguments: args))
48+
print(String(format: strMessage, arguments: args()))
4949
#endif
5050
#endif
5151
}

Tests/ComposableArchitectureTests/EffectTests.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,6 @@ final class EffectTests: XCTestCase {
186186

187187
#if canImport(_Concurrency) && compiler(>=5.5.2)
188188
func testTask() {
189-
#if os(Linux)
190-
// for some reason this test fails on Linux
191-
return
192-
#endif
193-
194189
let expectation = self.expectation(description: "Complete")
195190
var result: Int?
196191
Effect<Int, Never>.task {
@@ -203,11 +198,6 @@ final class EffectTests: XCTestCase {
203198
}
204199

205200
func testThrowingTask() {
206-
#if os(Linux)
207-
// for some reason this test fails on Linux
208-
return
209-
#endif
210-
211201
let expectation = self.expectation(description: "Complete")
212202
struct MyError: Error {}
213203
var result: Error?

Tests/ComposableArchitectureTests/TestStoreTests.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class TestStoreTests: XCTestCase {
5757

5858
store.send(.d)
5959
}
60+
61+
// XCTExpectFailure is not supported on Linux
62+
#if !os(Linux)
6063
func testExpectedStateEquality() {
6164
struct State: Equatable {
6265
var count: Int = 0
@@ -107,6 +110,7 @@ class TestStoreTests: XCTestCase {
107110
}
108111
}
109112
}
113+
110114
func testExpectedStateEqualityMustModify() {
111115
struct State: Equatable {
112116
var count: Int = 0
@@ -145,6 +149,7 @@ class TestStoreTests: XCTestCase {
145149
}
146150
}
147151
}
152+
#endif
148153

149154
func testStateAccess() {
150155
enum Action { case a, b, c, d }

0 commit comments

Comments
 (0)