Changeset 477 for trunk/TestCase/SimpleTestCase/StreamTest.ab
- Timestamp:
- Mar 13, 2008, 8:19:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TestCase/SimpleTestCase/StreamTest.ab
r432 r477 5 5 Sub TestMain() 6 6 StringReaderTest() 7 MemoryStreamTest() 7 8 End Sub 8 9 … … 18 19 End Sub 19 20 21 Sub MemoryStreamTest() 22 Dim buf[3] As Byte 23 Dim ms = New MemoryStream(buf,0,4,True) 24 UnitTest("ms.CanRead True", ms.CanRead() = True) 25 UnitTest("ms.CanWrite True", ms.CanWrite() = True) 26 UnitTest("ms.Length = 4", ms.Length() = 4) 27 UnitTest("ms.Capacity = 4", ms.Capacity() = 4) 28 ms.WriteByte(11) 29 ms.WriteByte(22) 30 ms.WriteByte(33) 31 ms.Position = 0 32 UnitTest("ms.Position = 0", ms.Position() = 0) 33 UnitTest("ms.ReadByte - 11", ms.ReadByte() = 11) 34 UnitTest("ms.ReadByte - 22", ms.ReadByte() = 22) 35 UnitTest("ms.ReadByte - 33", ms.ReadByte() = 33) 36 UnitTest("ms.Position = 3", ms.Position() = 3) 37 End Sub 38 20 39 End Namespace 21 40
Note:
See TracChangeset
for help on using the changeset viewer.