Skip to content

Commit bd630e7

Browse files
committed
fix remove info test
1 parent 4c15cc7 commit bd630e7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

common/src/test/java/com/pedro/common/ExtensionTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class ExtensionTest {
3131
val buffer = ByteBuffer.wrap(ByteArray(256) { 0x00 }.mapIndexed { index, byte -> index.toByte() }.toByteArray())
3232
val offset = 4
3333
val minusLimit = 2
34-
val info = MediaFrame.Info(4, buffer.remaining() - minusLimit, 0, false)
34+
val info = MediaFrame.Info(4, buffer.capacity() - offset - minusLimit, 0, false)
3535
val result = buffer.removeInfo(info)
36-
assertEquals(buffer.capacity() - offset - minusLimit, result.remaining())
36+
assertEquals(buffer.capacity() - offset - minusLimit, result.capacity())
3737
assertEquals(offset.toByte(), result.get(0))
38-
assertEquals((buffer.capacity() - 1 - minusLimit).toByte(), result.get(result.remaining() - 1))
38+
assertEquals((buffer.capacity() - 1 - minusLimit).toByte(), result.get(result.capacity() - 1))
3939
}
4040

4141
@Test

0 commit comments

Comments
 (0)