Changeset 477 for trunk


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

MemoryStreamのテストケースを追加

Location:
trunk/TestCase/SimpleTestCase
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/TestCase/SimpleTestCase/SimpleTestCase.idx

    r473 r477  
    4040#include "SerializeTest.ab"
    4141_ClearNamespaceImported
    42 
    43 'リソースファイル
    44 #include "resource.ab"
    45 #resource "SimpleTestCase.rc"
  • trunk/TestCase/SimpleTestCase/SimpleTestCase.pj

    r473 r477  
    2323#DEBUG_EXE_PATH=
    2424
    25 #RESOURCE=SimpleTestCase.rc
     25#RESOURCE=0
    2626
    2727#SOURCE
  • 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.