Last change
on this file since 337 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 |
|
---|
5 | Imports System.Text
|
---|
6 |
|
---|
7 | Namespace StringBuilderTest
|
---|
8 |
|
---|
9 | Sub 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 = "でてこいでてこいいけのこい")
|
---|
20 | End Sub
|
---|
21 |
|
---|
22 | End Namespace 'ActiveBasic_StringsTest
|
---|
23 |
|
---|
24 | StringBuilderTest.TestMain()
|
---|
25 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.