@@ -99,13 +99,13 @@ class CombineParametersTest : TestBase() {
99
99
}
100
100
101
101
@Test
102
- fun testEmptyVararg () = runTest {
102
+ fun testSingleVararg () = runTest {
103
103
val list = combine(flowOf(1 , 2 , 3 )) { args: Array <Any ?> -> args[0 ] }.toList()
104
104
assertEquals(listOf (1 , 2 , 3 ), list)
105
105
}
106
106
107
107
@Test
108
- fun testEmptyVarargTransform () = runTest {
108
+ fun testSingleVarargTransform () = runTest {
109
109
val list = combineTransform(flowOf(1 , 2 , 3 )) { args: Array <Any ?> -> emit(args[0 ]) }.toList()
110
110
assertEquals(listOf (1 , 2 , 3 ), list)
111
111
}
@@ -131,33 +131,33 @@ class CombineParametersTest : TestBase() {
131
131
}
132
132
133
133
@Test
134
- fun testEmpty () = runTest {
135
- val value = combineTransform { args: Array <Int > ->
134
+ fun testTransformEmptyIterable () = runTest {
135
+ val value = combineTransform(emptyList()) { args: Array <Int > ->
136
136
emit(args[0 ] + args[1 ])
137
137
}.singleOrNull()
138
138
assertNull(value)
139
139
}
140
140
141
141
@Test
142
- fun testEmptyIterable () = runTest {
143
- val value = combineTransform(emptyList()) { args: Array <Int > ->
142
+ fun testTransformEmptyVararg () = runTest {
143
+ val value = combineTransform { args: Array <Int > ->
144
144
emit(args[0 ] + args[1 ])
145
145
}.singleOrNull()
146
146
assertNull(value)
147
147
}
148
148
149
149
@Test
150
- fun testEmptyReified () = runTest {
151
- val value = combineTransform { args: Array <Int > ->
152
- emit( args[0 ] + args[1 ])
150
+ fun testEmptyIterable () = runTest {
151
+ val value = combine(emptyList()) { args: Array <Int > ->
152
+ args[0 ] + args[1 ]
153
153
}.singleOrNull()
154
154
assertNull(value)
155
155
}
156
156
157
157
@Test
158
- fun testEmptyIterableReified () = runTest {
159
- val value = combineTransform(emptyList()) { args: Array <Int > ->
160
- emit( args[0 ] + args[1 ])
158
+ fun testEmptyVararg () = runTest {
159
+ val value = combine { args: Array <Int > ->
160
+ args[0 ] + args[1 ]
161
161
}.singleOrNull()
162
162
assertNull(value)
163
163
}
0 commit comments