fixes
This commit is contained in:
parent
d0b0cad94c
commit
36480eb539
@ -48,8 +48,3 @@ fun calculatePagesNumber(datasetSize: Long, pageSize: Int): Int {
|
||||
fun calculatePagesNumber(datasetSize: Int, pageSize: Int): Int {
|
||||
return ceil(datasetSize.toDouble() / pageSize).toInt()
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates pages count for given [datasetSize]
|
||||
*/
|
||||
inline fun Pagination.calculatePagesNumber(datasetSize: Int): Int = calculatePagesNumber(datasetSize, size)
|
||||
|
@ -10,7 +10,7 @@ const val defaultExtraLargePageSize = 15
|
||||
@Suppress("NOTHING_TO_INLINE", "FunctionName")
|
||||
inline fun FirstPagePagination(size: Int = defaultMediumPageSize) = SimplePagination(
|
||||
page = 0,
|
||||
size = defaultMediumPageSize
|
||||
size = size
|
||||
)
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
|
@ -26,11 +26,11 @@ class ContentSerialization {
|
||||
}
|
||||
|
||||
val stringified = registeredContentFakes.map {
|
||||
Json.plain.stringify(RegisteredContent.serializer(), it)
|
||||
Json.stringify(RegisteredContent.serializer(), it)
|
||||
}
|
||||
|
||||
val parsed = stringified.map {
|
||||
Json.plain.parse(RegisteredContent.serializer(), it)
|
||||
Json.parse(RegisteredContent.serializer(), it)
|
||||
}
|
||||
|
||||
parsed.forEachIndexed { i, registeredContent -> assertEquals(registeredContentFakes[i], registeredContent) }
|
||||
|
@ -38,7 +38,6 @@ kotlin {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib')
|
||||
api "org.jetbrains.exposed:exposed-core:$exposed_version"
|
||||
api "com.soywiz.korlibs.klock:klock:$klockVersion"
|
||||
|
||||
if ((project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true") {
|
||||
api "com.insanusmokrassar:postssystem.core:$core_version"
|
||||
@ -53,6 +52,11 @@ kotlin {
|
||||
implementation kotlin('test-annotations-common')
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib')
|
||||
}
|
||||
}
|
||||
|
||||
jvmTest {
|
||||
dependencies {
|
||||
@ -60,6 +64,12 @@ kotlin {
|
||||
implementation "org.xerial:sqlite-jdbc:$test_sqlite_version"
|
||||
}
|
||||
}
|
||||
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,3 +1,2 @@
|
||||
exposed_version=0.23.1
|
||||
test_sqlite_version=3.30.1
|
||||
test_junit_version=5.5.2
|
||||
|
Loading…
Reference in New Issue
Block a user