Ignore:
Timestamp:
Mar 13, 2008, 8:19:14 PM (17 years ago)
Author:
NoWest
Message:

MemoryStreamのテストケースを追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/TestCase/SimpleTestCase/StreamTest.ab

    r432 r477  
    55Sub TestMain()
    66    StringReaderTest()
     7    MemoryStreamTest()
    78End Sub
    89
     
    1819End Sub
    1920
     21Sub 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)
     37End Sub
     38
    2039End Namespace
    2140
Note: See TracChangeset for help on using the changeset viewer.