Add unit tests for packet parsing, DNS cache, blocklist parser and server list

DnsCache takes its clock as a parameter so expiry can be tested.
This commit is contained in:
2026-10-25 12:16:46 +02:00
parent 43e57c9357
commit 8c6bb33527
8 changed files with 476 additions and 3 deletions
+7
View File
@@ -42,6 +42,11 @@ android {
includeInApk = false
includeInBundle = false
}
testOptions {
// android.util.Log and friends are no-ops in JVM unit tests
unitTests.isReturnDefaultValues = true
}
}
dependencies {
@@ -51,4 +56,6 @@ dependencies {
implementation("androidx.compose.material3:material3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
testImplementation("junit:junit:4.13.2")
}