File tree Expand file tree Collapse file tree 4 files changed +12
-18
lines changed
commonMain/kotlin/dev/sargunv/pokekotlin/model
commonTest/kotlin/dev/sargunv/pokekotlin/test Expand file tree Collapse file tree 4 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66 pull_request :
77 workflow_dispatch :
88
Original file line number Diff line number Diff line change 11kotlin.code.style =official
22kotlin.incremental.wasm =true
3- kotlin.daemon.jvmargs =-Xmx2048M
3+ kotlin.daemon.jvmargs =-Xmx4096M
44org.jetbrains.dokka.experimental.gradle.pluginMode =V2Enabled
55org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn =true
66org.gradle.configuration-cache =false
7- org.gradle.jvmargs =-Xmx2048M -Dfile.encoding =UTF-8
7+ org.gradle.jvmargs =-Xmx4096M -Dfile.encoding =UTF-8
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ data class Region(
5858 val id : Int ,
5959 val name : String ,
6060 val locations : List <NamedApiResource >,
61- val mainGeneration : NamedApiResource ,
61+ val mainGeneration : NamedApiResource ? ,
6262 val names : List <Name >,
6363 val pokedexes : List <NamedApiResource >,
6464 val versionGroups : List <NamedApiResource >,
Original file line number Diff line number Diff line change @@ -10,28 +10,22 @@ import kotlinx.coroutines.test.runTest
1010@Ignore
1111class BulkTest {
1212
13- private suspend fun testCase (cat : String , ids : List <Int >, getObject : suspend (Int ) -> Any ) {
14- var pass = true
15- val count = ids.size
16- println (" $cat : $count total" )
17- ids.forEachIndexed { i, id ->
18- println (" $cat ${i + 1 } /$count (id=$id )" )
19- try {
20- getObject(id)
21- } catch (e: Throwable ) {
22- println (" ERROR: ${e::class .simpleName} : ${e.message} " )
23- pass = false
24- }
13+ private suspend fun testCase (cat : String , id : Int , getObject : suspend (Int ) -> Any ) {
14+ println (" $cat (id=$id )" )
15+ try {
16+ getObject(id)
17+ } catch (e: Throwable ) {
18+ println (" ERROR: ${e::class .simpleName} : ${e.message} " )
19+ fail()
2520 }
26- if (! pass) fail()
2721 }
2822
2923 private suspend fun <T : ResourceSummary > testEach (
3024 getList : suspend (Int , Int ) -> ResourceSummaryList <T >,
3125 getObject : suspend (Int ) -> Any ,
3226 ) {
3327 val list = getList(0 , getList(0 , 0 ).count).results
34- testCase(list[0 ].category, list.map { it.id } , getObject)
28+ list.forEach { testCase(list[0 ].category, it.id, getObject) }
3529 }
3630
3731 @Test
You can’t perform that action at this time.
0 commit comments