Initial commit

This commit is contained in:
2025-09-26 11:00:51 -03:00
parent 7f3ee661a5
commit c6f1764a9d
10 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package dev.carlosmartino.common
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Test
import org.junit.runner.RunWith
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("dev.carlosmartino.common.test", appContext.packageName)
}
}

View File

@@ -0,0 +1,16 @@
package dev.carlosmartino.common
import kotlin.test.Test
import kotlin.test.assertEquals
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View File

@@ -0,0 +1,3 @@
package dev.carlosmartino.common
actual fun platform() = "Android"

View File

@@ -0,0 +1,3 @@
package dev.carlosmartino.common
expect fun platform(): String

View File

@@ -0,0 +1,3 @@
package dev.carlosmartino.common
actual fun platform() = "iOS"