Skip to content

Commit e74d09a

Browse files
Fix iOS tests
1 parent d2b90e5 commit e74d09a

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

library/build.gradle

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,9 @@ kotlin {
3838
embedBitcode("disable")
3939
linkerOpts("-F$projectDir/../Carthage/Build/iOS")
4040
}
41-
getTest("DEBUG").linkerOpts("-F../Carthage/Build/iOS", "-framework", "GCDWebServers")
42-
// getTest("DEBUG").linkerOpts.add("-framework GCDWebServers".toString())
43-
// getTest("DEBUG").linkerOpts.add("-F../Carthage/Build/iOS".toString())
44-
// getTest("DEBUG").freeCompilerArgs.add("-framework GCDWebServers".toString())
41+
getTest("DEBUG").linkerOpts("-F$projectDir/../Carthage/Build/iOS", "-framework", "GCDWebServers")
4542
}
4643

47-
// [compilations.main, compilations.test].each {
48-
// it.cinterops {
49-
// }
5044
compilations.main.cinterops {
5145
gcdWebServer {
5246
defFile("gcdWebServer.def")
@@ -73,7 +67,7 @@ kotlin {
7367
implementation 'org.jetbrains.kotlin:kotlin-test-common'
7468
implementation 'org.jetbrains.kotlin:kotlin-test-annotations-common'
7569
implementation 'io.ktor:ktor-client-core:1.3.2'
76-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
70+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5-native-mt'
7771
}
7872
}
7973

@@ -87,7 +81,7 @@ kotlin {
8781

8882
androidTest {
8983
dependencies {
90-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.7'
84+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.5-native-mt'
9185
implementation 'androidx.test.ext:junit:1.1.1'
9286
implementation 'org.robolectric:robolectric:4.3.1'
9387
implementation 'org.jetbrains.kotlin:kotlin-test'
@@ -98,7 +92,7 @@ kotlin {
9892

9993
iosTest {
10094
dependencies {
101-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.7'
95+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.5-native-mt'
10296
implementation 'io.ktor:ktor-client-ios:1.3.2'
10397
}
10498
}

library/src/commonTest/kotlin/HttpServerTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class HttpServerTest: BaseTest() {
3333
if (request.path != "/test") {
3434
return Response(404, emptyMap(), null, null)
3535
}
36-
return Response(200, emptyMap(), Data("test"), null)
36+
return Response(200, emptyMap(), Data("test"), "text/plain")
3737
}
3838
}
3939

0 commit comments

Comments
 (0)