trivial improvements
- replace String.deleteIfExists with kotlin.io.Path.deleteIfExists - remove unused "dtb.src", use "dtb.*.src" insteadpull/140/head v14_r2
parent
2076fad7d3
commit
94570b1fcc
@ -0,0 +1,30 @@
|
||||
package rom.fdt
|
||||
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import kotlin.io.path.createTempFile
|
||||
import kotlin.io.path.deleteIfExists
|
||||
import kotlin.io.path.writeBytes
|
||||
|
||||
class DTCTest {
|
||||
private lateinit var tempFile :java.nio.file.Path
|
||||
|
||||
@Before
|
||||
fun before() {
|
||||
tempFile = createTempFile()
|
||||
val dtbData = this::class.java.classLoader.getResourceAsStream("multiple_DT.dtb")!!.readAllBytes()
|
||||
tempFile.writeBytes(dtbData)
|
||||
}
|
||||
|
||||
@After
|
||||
fun after() {
|
||||
tempFile.deleteIfExists()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun doIt() {
|
||||
val dtbList = DTC.parseMultiple(tempFile.toAbsolutePath().toString())
|
||||
check(dtbList.size == 4)
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
@ -1,14 +0,0 @@
|
||||
package cfig.lazybox.sysinfo
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
import org.junit.jupiter.api.Assertions.*
|
||||
import java.io.File
|
||||
|
||||
class CpuInfoTest {
|
||||
|
||||
@Test
|
||||
fun probeInfo() {
|
||||
CpuInfo.construct()
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
Subproject commit c2e5850a225bd765fa45b6c628106a82aee2a66f
|
||||
Subproject commit 24b0660fb6859fe738599b1e0a1faf1aa9381613
|
@ -1 +1 @@
|
||||
Subproject commit b5906e9ac69e0de09d8380b3f3409ed336017262
|
||||
Subproject commit 106cacece826ef18b67117118a37ff034ec72f61
|
@ -1 +1 @@
|
||||
Subproject commit 631af3d1c11343c0a2df1d044cabd44e78fdf865
|
||||
Subproject commit 4ed25ab4b19cacc8f65753cd35fb4978fdb7229f
|
Loading…
Reference in New Issue