Line | |
---|
1 | '--------------------------------------------------------------------
|
---|
2 | ' Test case of Object Class
|
---|
3 | '--------------------------------------------------------------------
|
---|
4 |
|
---|
5 | Namespace ObjectTest
|
---|
6 |
|
---|
7 | Dim obj1 As Object
|
---|
8 | Dim obj2 As Object
|
---|
9 |
|
---|
10 | UnitTest( "Object.Equals(case 1)", obj1.Equals( obj1 ) )
|
---|
11 | UnitTest( "Object.Equals(case 2)", obj1.Equals( obj2 ) = False )
|
---|
12 |
|
---|
13 | UnitTest( "Object.ReferenceEquals(case 1)", Object.ReferenceEquals( obj1, obj2 ) = False )
|
---|
14 | Dim obj3 = obj1
|
---|
15 | UnitTest( "Object.ReferenceEquals(case 2)", Object.ReferenceEquals( obj1, obj3 ) )
|
---|
16 |
|
---|
17 | ' TODO: ObjPtr関数の実装を待つ
|
---|
18 | 'UnitTest( "Object.GetHashCode", obj1.GetHashCode() = ObjPtr( obj1 ) )
|
---|
19 |
|
---|
20 | UnitTest( "Object.ToString", obj1.ToString() = "Object" )
|
---|
21 |
|
---|
22 | UnitTest( "Object.GetType", obj1.GetType().Name = "Object" )
|
---|
23 |
|
---|
24 | End Namespace
|
---|
Note:
See
TracBrowser
for help on using the repository browser.