forked from bhoogter/VB6TocSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodTestCases.bas
84 lines (69 loc) · 2.3 KB
/
modTestCases.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Attribute VB_Name = "modTestCases"
Option Explicit
' This module exists solely to list test conversion caess to make sure the converter can convert itself containing them.
' There should be no active and/or used code in this module.
' These tests are not run, they are conversion tests. They should be converted correctly when this project is converted.
Public Sub testCallModuleFunction()
' module name (w/, w/o)
' assign value (w/w/o)
' empty args parans (w/w/o)
Dim S As String
modGit.GitVersion
GitVersion
modGit.GitCmd "git --version"
S = modGit.GitCmd("git --verison")
GitCmd "git --version"
S = GitCmd("git --verison")
S = modGit.GitVersion()
modGit.GitVersion
S = GitVersion()
GitVersion
End Sub
Public Sub testBooleans()
' not (w/w/o)
' if (w/w/o)
' fcall (w/w/o)
Dim B As Boolean, NB As Boolean
B = HasGit
B = HasGit()
B = modGit.HasGit
B = modGit.HasGit()
B = Not HasGit
B = Not HasGit()
B = Not modGit.HasGit
B = Not modGit.HasGit()
TestCallWithBooleanFunction HasGit
TestCallWithBooleanFunction Not HasGit
TestCallWithBooleanFunction modGit.HasGit
TestCallWithBooleanFunction Not modGit.HasGit
TestCallWithBooleanFunction HasGit()
TestCallWithBooleanFunction Not HasGit()
TestCallWithBooleanFunction modGit.HasGit()
TestCallWithBooleanFunction Not modGit.HasGit()
If HasGit Then Debug.Print ""
If HasGit() Then Debug.Print ""
If modGit.HasGit Then Debug.Print
If modGit.HasGit() Then Debug.Print
If Not HasGit Then Debug.Print ""
If Not HasGit() Then Debug.Print ""
If Not modGit.HasGit Then Debug.Print
If Not modGit.HasGit() Then Debug.Print
End Sub
Public Function TestCallWithBooleanFunction(ByVal B As Boolean) As Boolean
TestCallWithBooleanFunction = True
End Function
' Also have Property in a comment
Public Function testFunctionWithPropertyInName() As String()
testFunctionWithPropertyInName = Array()
End Function
Public Sub TestPrivateLocalFunctionCall()
PrivateLocalFunctionCall
Call PrivateLocalFunctionCall
End Sub
Private Sub PrivateLocalFunctionCall()
' empty
End Sub
' This will only be readable if the file converts with correct braces.
Public Function TestFileFinishesWell() As Boolean
TestFileFinishesWell = True
End Function