Skip to content

Commit

Permalink
Refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Nov 19, 2024
1 parent 2c4bedc commit a27e3c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion coil-test/src/commonMain/kotlin/coil3/test/FakeImage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package coil3.test

import coil3.Canvas
import coil3.Image
import coil3.test.internal.Black

/**
* A simple [Image] that draws a 100x100 black square by default.
Expand All @@ -11,7 +12,7 @@ expect class FakeImage(
height: Int = 100,
size: Long = 4L * width * height,
shareable: Boolean = true,
color: Int = 0xFF000000.toInt(),
color: Int = Black,
) : Image {
override val width: Int
override val height: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import coil3.request.ImageRequest
import coil3.request.ImageResult
import coil3.size.Size
import coil3.test.FakeImageLoaderEngine.RequestTransformer
import coil3.test.internal.imageResultOf
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.asSharedFlow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package coil3.test
package coil3.test.internal

import coil3.Image
import coil3.decode.DataSource
Expand All @@ -13,3 +13,6 @@ internal fun imageResultOf(
request = request,
dataSource = DataSource.MEMORY,
)

// Format: 0xALPHA_RED_GREEN_BLUE
internal const val Black = 0xFF_00_00_00.toInt()

0 comments on commit a27e3c5

Please sign in to comment.