Skip to content

Commit

Permalink
Merge pull request #1029 from bossm0n5t3r/fix/edit-capturing-generic-…
Browse files Browse the repository at this point in the history
…arguments-test

Edit CapturingGenericArgumentsTest
  • Loading branch information
Raibaz committed Jan 20, 2023
2 parents b99afbd + 7858aac commit 7d322e3
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package io.mockk.it

import io.mockk.*
import kotlin.test.Ignore
import io.mockk.Runs
import io.mockk.every
import io.mockk.just
import io.mockk.mockk
import io.mockk.slot
import kotlin.test.Test

@Ignore
class CapturingGenericArgumentsTest {
/**
* Unable to capture arguments passed to generic functions.
* Verifies issue #223.
*/
@Test
fun captureGenericArgument() {
val mock = createMock<Int>()
Expand All @@ -20,7 +18,7 @@ class CapturingGenericArgumentsTest {
fun bar(value: T)
}

inline fun <reified T : Any> createMock(): Foo<Any> {
private inline fun <reified T : Any> createMock(): Foo<Any> {
val slot = slot<T>()

return mockk {
Expand All @@ -30,7 +28,7 @@ class CapturingGenericArgumentsTest {
}
}

fun <T> Foo<T>.tryBar(value: T) {
private fun <T> Foo<T>.tryBar(value: T) {
bar(value)
}
}

0 comments on commit 7d322e3

Please sign in to comment.