[android] Fixed an issue with native code throwing an exception expecting bound… (#830)

Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
Artak Kalantarian
2023-02-22 00:52:40 -08:00
committed by GitHub
parent 1816953c8b
commit 5be1eeeedd
3 changed files with 88 additions and 8 deletions

View File

@@ -0,0 +1,22 @@
package com.mapbox.mapboxsdk.style.sources
import androidx.test.annotation.UiThreadTest
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4ClassRunner::class)
@UiThreadTest
class RasterSourceTest {
@Test
fun rasterSource_constructor() {
val tiles = arrayOf("https://example.com")
val tileSet = TileSet("2.1.0", *tiles)
// set bounds on tile set
val bounds = floatArrayOf(-180.0f, -85.05113f, 180.0f, 85.05113f)
tileSet.setBounds(*bounds)
// create RasterSource
RasterSource("source_id", tileSet)
}
}