Add test for merge3 filter

This commit is contained in:
anzhu 2023-04-21 16:33:31 +03:00
parent 2e19e8ca42
commit d60f90160b

View File

@ -5,6 +5,7 @@ import net.sergeych.mp_logger.Log
import net.sergeych.sprintf.sprintf import net.sergeych.sprintf.sprintf
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertTrue
val List<Char>.str: String get() = joinToString("") val List<Char>.str: String get() = joinToString("")
@ -105,4 +106,16 @@ class BasicTest {
println(unchanged) println(unchanged)
assertEquals(0, unchanged.referenceIndex) assertEquals(0, unchanged.referenceIndex)
} }
@Test
fun testMergeFilter() {
Log.connectConsole()
val source = "lxcvv".toList()
val our = "lssdfasdwerwev".toList()
val their = "lxcvasdfasdfs".toList()
val result = merge3(source, their, our)
println("got result")
val unchanged = result.blocks.filter { it is MergedBlock.Unchanged }
assertTrue(true)
}
} }