mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
Fix unit test that uses the ByteReader
This commit is contained in:
parent
202b88f438
commit
2927b96d25
1 changed files with 10 additions and 7 deletions
|
@ -73,19 +73,22 @@ public class BufferTest {
|
|||
|
||||
Gst.Base.ByteReader reader = new Gst.Base.ByteReader (buffer);
|
||||
byte b;
|
||||
Assert.IsTrue (reader.GetUint8 (out b));
|
||||
uint u;
|
||||
Assert.IsTrue (reader.PeekUInt32Be (out u));
|
||||
Assert.IsTrue (u == 0x00010203);
|
||||
Assert.IsTrue (reader.GetUInt8 (out b));
|
||||
Assert.IsTrue (b == 0 && 0 == data[reader.Pos-1]);
|
||||
Assert.IsTrue (reader.GetUint8 (out b));
|
||||
Assert.IsTrue (reader.GetUInt8 (out b));
|
||||
Assert.IsTrue (b == 1 && 1 == data[reader.Pos-1]);
|
||||
Assert.IsTrue (reader.GetUint8 (out b));
|
||||
Assert.IsTrue (reader.GetUInt8 (out b));
|
||||
Assert.IsTrue (b == 2 && 2 == data[reader.Pos-1]);
|
||||
Assert.IsTrue (reader.GetUint8 (out b));
|
||||
Assert.IsTrue (reader.GetUInt8 (out b));
|
||||
Assert.IsTrue (b == 3 && 3 == data[reader.Pos-1]);
|
||||
Assert.IsTrue (reader.GetUint8 (out b));
|
||||
Assert.IsTrue (reader.GetUInt8 (out b));
|
||||
Assert.IsTrue (b == 4 && 4 == data[reader.Pos-1]);
|
||||
Assert.IsTrue (reader.GetUint8 (out b));
|
||||
Assert.IsTrue (reader.GetUInt8 (out b));
|
||||
Assert.IsTrue (b == 5 && 5 == data[reader.Pos-1]);
|
||||
Assert.IsFalse (reader.GetUint8 (out b));
|
||||
Assert.IsFalse (reader.GetUInt8 (out b));
|
||||
Assert.IsTrue (reader.Pos == buffer.Size);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue