source: trunk/ab5.0/ablib/TestCase/SimpleTestCase/CollectionTest.ab@ 537

Last change on this file since 537 was 537, checked in by イグトランス (egtra), 16 years ago

Dictionary.Removeとテストを追加。#promptでコンパイルできない問題を修正。

File size: 623 bytes
Line 
1Namespace CollectionTest
2
3Sub TestMain()
4 Dim d As System.Collections.Generic.Dictionary<String, String>
5 d.Add("赤", "Red")
6 d.Add("黄", "Yellow")
7 d.Add("緑", "Green")
8 d.Add("青", "Blue")
9 d.Add("茶", "Tea")
10
11 UnitTest("Dictionary.Add, Item (1)", d.Item["赤"] = "Red")
12 UnitTest("Dictionary.Add, Item (2)", d.Item["黄"] = "Yellow")
13 UnitTest("Dictionary.Add, Item (3)", d.Item("緑") = "Green")
14 UnitTest("Dictionary.Add, Item (4)", d.Item("青") = "Blue")
15
16 UnitTest("Dictionary.Remove", d.Remove("茶"))
17
18 UnitTest("Dictionary.Count", d.Count = 4)
19
20End Sub
21
22End Namespace
23
24CollectionTest.TestMain()
Note: See TracBrowser for help on using the repository browser.