riku
2021-06-30 5353617c7b2135ab00f98d8e05b2f8dfb2e096ed
src/test/kotlin/com/flightfeather/uav/Test.kt
@@ -1,6 +1,7 @@
package com.flightfeather.uav
import com.flightfeather.uav.common.utils.FileExchange
import com.flightfeather.uav.domain.entity.Company
import com.flightfeather.uav.socket.bean.DataUnit
import com.flightfeather.uav.socket.decoder.AirDataDecoder
import com.flightfeather.uav.socket.eunm.AirCommandUnit
@@ -47,4 +48,22 @@
    fun dataChange() {
        FileExchange().doTask2()
    }
    @Test
    fun listCopy() {
        val l1 = listOf(Company().apply { ciGuid = "a" }, Company().apply { ciGuid = "b" }, Company().apply { ciGuid = "c" })
        val l2 = mutableListOf<Company>().apply { addAll(l1) }
        l2[1].ciGuid = "d"
        println(l1)
        println(l2)
    }
    @Test
    fun average() {
        for (i in 0..2) {
            println(i)
        }
        val list = listOf(1, 2, 3, 4, 5, 0)
        println(list.average())
    }
}