source: trunk/TestCase/SimpleTestCase/StringBuilderTest.ab@ 451

Last change on this file since 451 was 299, checked in by dai, 17 years ago

【32bitコンパイラ】
静的リンクライブラリを実装
ジェネリクスを実装
※64bitコンパイラは未実装

File size: 989 bytes
Line 
1'--------------------------------------------------------------------
2' Test case of System.Text.StringBuilder Class
3'--------------------------------------------------------------------
4
5Imports System.Text
6
7Namespace StringBuilderTest
8
9Sub TestMain()
10 Dim sb = New StringBuilder("Hello")
11 UnitTest("StringBuilder - Constractor & ToString", sb.ToString = "Hello")
12 UnitTest("StringBuilder.ToString(index, count)", sb.ToString(1, 3) = "ell")
13 UnitTest("StringBuilder.Append", sb.Append("StringBuilder").ToString = "HelloStringBuilder")
14 UnitTest("StringBuilder.Insert (String)", sb.Insert(5, ", ").ToString = "Hello, StringBuilder")
15 sb.Length = 0
16 UnitTest("StringBuilder.Length = 0", sb.ToString = "")
17 sb.Append("でてこいでてこいいけのこい")
18 sb.Replace("こい", "いけ").Replace("いけ", "こい")
19 UnitTest("StringBuilder.Replace (String)", sb.ToString = "でてこいでてこいいけのこい")
20End Sub
21
22End Namespace 'ActiveBasic_StringsTest
23
24StringBuilderTest.TestMain()
25
Note: See TracBrowser for help on using the repository browser.