Last change
on this file since 246 was 230, checked in by イグトランス (egtra), 18 years ago |
GCHandleTestの追加、全てのテスト処理を関数に入れる
|
File size:
589 bytes
|
Line | |
---|
1 | #require <Classes/System/Runtime/InteropServices/GCHandle.ab>
|
---|
2 |
|
---|
3 | '--------------------------------------------------------------------
|
---|
4 | ' Test case of GCHandle Class
|
---|
5 | '--------------------------------------------------------------------
|
---|
6 |
|
---|
7 | Namespace GCHandleTest
|
---|
8 |
|
---|
9 | Sub TestMain()
|
---|
10 | Dim o = New Object
|
---|
11 | Dim gch = GCHandle.Alloc(o)
|
---|
12 | UnitTest("GCHandle.Alloc, Target", o.Equals(gch.Target))
|
---|
13 |
|
---|
14 | Dim ip = GCHandle.ToIntPtr(gch)
|
---|
15 | gch = Nothing
|
---|
16 |
|
---|
17 | gch = GCHandle.FromIntPtr(ip)
|
---|
18 | UnitTest("GCHandle - IntPtr", o.Equals(gch.Target))
|
---|
19 |
|
---|
20 |
|
---|
21 | End Sub
|
---|
22 |
|
---|
23 | End Namespace
|
---|
24 |
|
---|
25 | GCHandleTest.TestMain()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.