Namespace StreamTest

Imports System.IO

Sub TestMain()
	StringReaderTest()
End Sub

Sub StringReaderTest()
	Dim sr = New StringReader(Ex"0 abc\n123\r\nあいうえお\r\nアイウエオ")
	UnitTest("sr.Read() - 1", sr.Read() = &h30)
	UnitTest("sr.Read() - 2", sr.Read() = &h20)
	UnitTest("sr.Peek()", sr.Peek() = &h61)
	UnitTest("sr.ReadLine() \n", sr.ReadLine() = "abc")
	UnitTest("sr.ReadLine() \r\n", sr.ReadLine() = "123")
	Dim s = sr.ReadToEnd()
	UnitTest("sr.ReadToEnd() \r\n", s = Ex"あいうえお\r\nアイウエオ")
End Sub

End Namespace

StreamTest.TestMain()
