Mock Android Log to fix PeerManager tests (#239)

This commit is contained in:
Shubert Munthali
2025-08-07 14:39:08 +03:00
committed by GitHub
parent b34ef896c7
commit 763d290055
2 changed files with 28 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
@file:JvmName("Log")
package android.util
fun d(tag: String, msg: String): Int {
println("DEBUG: $tag: $msg")
return 0;
}
fun e(tag: String, msg: String): Int {
println("ERROR: $tag: $msg")
return 0;
}
fun w(tag: String, msg: String): Int {
println("WARN: $tag: $msg")
return 0;
}
fun v(tag: String, msg: String): Int {
println("VERBOSE: $tag: $msg")
return 0;
}
fun i(tag: String, msg: String): Int {
println("INFO: $tag: $msg")
return 0;
}
@@ -3,7 +3,6 @@ package com.bitchat
import com.bitchat.android.mesh.PeerManager
import junit.framework.TestCase.assertEquals
import org.junit.Test
import kotlin.text.appendLine
class PeerManagerTest {