Changeset 397
- Timestamp:
- Jan 2, 2008, 1:25:56 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TestCase/SimpleTestCase/InterfaceTest.ab
r356 r397 9 9 Function Proc5() As String 10 10 Function Proc6( value As String ) As Boolean 11 End Interface 12 13 Interface IGenericTest<T> 14 Function GenericProc1() As T 15 Function GenericProc2( value As T ) As Boolean 11 16 End Interface 12 17 … … 31 36 32 37 Class Test2 33 Implements ITest1, ITest2 38 Implements ITest1, ITest2, IGenericTest<String> 34 39 35 40 a As Long … … 54 59 Override Function Proc6( value As String ) As Boolean 55 60 Return ( value = ( "Proc6 calling" + a.ToString() ) ) 61 End Function 62 63 Function GenericProc1() As String 64 Return "GenericProc1 is ok" 65 End Function 66 67 Function GenericProc2( value As String ) As Boolean 68 Return ( value = "GenericProc2 calling" ) 56 69 End Function 57 70 End Class … … 96 109 GlobalProc2( test2, test2, 1 ) 97 110 GlobalProc2( Nothing, itest2, 2 ) 111 112 Dim iGenericTest As IGenericTest<String> 113 iGenericTest = test2 As IGenericTest<String> 114 UnitTest( "Interface ... calling class2 interface 3", iGenericTest.GenericProc1() = "GenericProc1 is ok" ) 115 116 UnitTest( "Interface ... calling class2 interface 4", iGenericTest.GenericProc2( "GenericProc2 calling" ) ) 98 117 End Sub 99 118
Note:
See TracChangeset
for help on using the changeset viewer.