From 2927b96d2565a12e6829fef652394d593a34c024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 2 Oct 2009 15:49:05 +0200 Subject: [PATCH] Fix unit test that uses the ByteReader --- tests/BufferTest.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/BufferTest.cs b/tests/BufferTest.cs index 5a6eef20dc..b8548a1c85 100644 --- a/tests/BufferTest.cs +++ b/tests/BufferTest.cs @@ -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); } }