|
|
|
@ -10,11 +10,13 @@ import kotlin.test.assertEquals |
|
|
|
|
object Js5MasterIndexTest { |
|
|
|
|
private val ROOT = Paths.get(FlatFileStoreTest::class.java.getResource("master-index").toURI()) |
|
|
|
|
private val encoded = byteArrayOf(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4) |
|
|
|
|
private val decoded = Js5MasterIndex(mutableListOf( |
|
|
|
|
private val decoded = Js5MasterIndex( |
|
|
|
|
mutableListOf( |
|
|
|
|
Js5MasterIndex.Entry(0, 1), |
|
|
|
|
Js5MasterIndex.Entry(2, 3), |
|
|
|
|
Js5MasterIndex.Entry(4, 5) |
|
|
|
|
)) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
fun testCreate() { |
|
|
|
@ -22,7 +24,9 @@ object Js5MasterIndexTest { |
|
|
|
|
Js5MasterIndex.create(store) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
assertEquals(Js5MasterIndex(mutableListOf( |
|
|
|
|
assertEquals( |
|
|
|
|
Js5MasterIndex( |
|
|
|
|
mutableListOf( |
|
|
|
|
Js5MasterIndex.Entry(0, 379203374), |
|
|
|
|
Js5MasterIndex.Entry(0x12345678, -717247318), |
|
|
|
|
Js5MasterIndex.Entry(0, 0), |
|
|
|
@ -30,7 +34,9 @@ object Js5MasterIndexTest { |
|
|
|
|
Js5MasterIndex.Entry(0, 0), |
|
|
|
|
Js5MasterIndex.Entry(0, 0), |
|
|
|
|
Js5MasterIndex.Entry(0xAA55AA55.toInt(), -627983571) |
|
|
|
|
)), index) |
|
|
|
|
) |
|
|
|
|
), index |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|