Skip to content

Commit fb8da7b

Browse files
committed
update tests
1 parent 3570c80 commit fb8da7b

File tree

3 files changed

+45
-12
lines changed

3 files changed

+45
-12
lines changed

Tests/ACLibDeclarationDictCore/DeclarationDictTestCodemodule.cls

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,19 @@ Attribute VB_GlobalNameSpace = False
77
Attribute VB_Creatable = False
88
Attribute VB_PredeclaredId = False
99
Attribute VB_Exposed = False
10+
'---------------------------------------------------------------------------------------
11+
' Class: DeclarationDictTestCodemodule
12+
'---------------------------------------------------------------------------------------
13+
'
14+
' Different examples for declarations
15+
'
16+
'---------------------------------------------------------------------------------------
1017
Option Compare Database
1118
Option Explicit
1219

1320
'AccUnit:TestRelated
1421

15-
Implements CodeModulGenerator
22+
Implements ITestInterface
1623

1724
Dim AccUnitX As Long
1825
Private m_AccUnitInfo As String
@@ -59,11 +66,11 @@ Public Function AccUnitTestFunct(ByVal FuncParam1 As Variant, FuncParam2() As St
5966
Dim FuncVar1 As Variant, FuncVar2
6067
Dim FuncVar3() ' _
6168
Dim CommentX as String, CommentY As Long
62-
69+
6370
Dim FuncVar4 As Long: FuncVar4 = 5
64-
71+
6572
Dim Dim1 As Long: Dim Dim2
66-
73+
6774
Dim Counter2 ' _
6875
Public X asString, Y As Long
6976

@@ -99,15 +106,13 @@ Private Static Sub MyStaticSub(Optional ByVal Reset As Boolean = False)
99106
Static Counter2 As Integer
100107
End Sub
101108

102-
103-
Private Function CodeModulGenerator_CreateCodemodule(ByVal ComponentType As VBIDE.vbext_ComponentType, Optional ByVal Name As String = vbNullString) As VBIDE.VBComponent
109+
'---------------------------
110+
' Implement ITestInterface interface
104111
'
105-
End Function
106-
107-
Private Sub CodeModulGenerator_InsertDeclarationLine(ByVal Code As String)
112+
Private Sub ITestInterface_TestMe()
108113
'
109114
End Sub
110115

111-
Private Sub CodeModulGenerator_RemoveCodemodule()
116+
Private Function ITestInterface_TestProc(ByVal TestParam1 As Long) As Variant
112117
'
113-
End Sub
118+
End Function

Tests/ACLibDeclarationDictCore/DeclarationDictTests.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Public Sub ImportClassCodeModule_CheckKeysExists()
146146
Dim ActualDict As Scripting.Dictionary
147147

148148
Dim ExpectedKeys() As Variant
149-
ExpectedKeys = Array("CodeModulGenerator", "CodeModulGenerator_CreateCodemodule", "ComponentType", "Name", "CodeModulGenerator_InsertDeclarationLine", "Code", "CodeModulGenerator_RemoveCodemodule", _
149+
ExpectedKeys = Array("ITestInterface", "ITestInterface_TestMe", "ITestInterface_TestProc", "TestParam1", _
150150
"AccUnitX", "m_AccUnitInfo", "Field", "Const1", _
151151
"TestEnum", "TestEnum_P1", _
152152
"TestType1", "FldA", "FldB", "FldC", _
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
VERSION 1.0 CLASS
2+
BEGIN
3+
MultiUse = -1 'True
4+
END
5+
Attribute VB_Name = "ITestInterface"
6+
Attribute VB_GlobalNameSpace = False
7+
Attribute VB_Creatable = False
8+
Attribute VB_PredeclaredId = False
9+
Attribute VB_Exposed = False
10+
'---------------------------------------------------------------------------------------
11+
' Interface: ITest
12+
'---------------------------------------------------------------------------------------
13+
'
14+
' Interface for Implement test in DeclarationDictTestCodemodule
15+
'
16+
'---------------------------------------------------------------------------------------
17+
Option Compare Database
18+
Option Explicit
19+
20+
'AccUnit:TestRelated
21+
22+
Public Sub TestMe()
23+
'
24+
End Sub
25+
26+
Public Function TestProc(ByVal TestParam1 As Long)
27+
'
28+
End Function

0 commit comments

Comments
 (0)