blob: 2a616c24044d2157cead6196cabd1ec35dd7444f (
plain)
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
|
REM ***** BASIC *****
Option Compatible
Option Explicit
Function doUnitTest() As String
doUnitTest = "FAIL"
If CheckType1(32) = 0 Then
Exit Function
End If
If CheckType2(32) = 0 Then
Exit Function
End If
If CheckType2() = 0 Then
Exit Function
End If
doUnitTest = "OK"
End Function
Function CheckType1(x As Integer) As Integer
If TypeName(x) = "Integer" Then
CheckType1 = 1
Else
CheckType1 = 0
End If
End Function
Function CheckType2(Optional y As Integer = 32 ) As Integer
If TypeName(y) = "Integer" Then
CheckType2 = 1
Else
CheckType2 = 0
End If
End Function
|