diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /basic/qa/vba_tests/ole_ObjAssignToNothing.vb | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'basic/qa/vba_tests/ole_ObjAssignToNothing.vb')
-rw-r--r-- | basic/qa/vba_tests/ole_ObjAssignToNothing.vb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/basic/qa/vba_tests/ole_ObjAssignToNothing.vb b/basic/qa/vba_tests/ole_ObjAssignToNothing.vb new file mode 100644 index 000000000..d68664b41 --- /dev/null +++ b/basic/qa/vba_tests/ole_ObjAssignToNothing.vb @@ -0,0 +1,19 @@ +Option VBASupport 1 +Function doUnitTest(TestData as String, Driver as String) as String +Rem Ensure object assignment is by reference +Rem when object member is used ( as lhs ) +Rem This time we are testing assigning with special Nothing +Rem keyword +Set cn = New ADODB.Connection +Dim conStr As String +conStr = "Provider=MSDASQL;Driver={" & Driver & "};DBQ=" +conStr = conStr & TestData & "; ReadOnly=False;" +cn.Open conStr +Set objCmd = New ADODB.Command +objCmd.ActiveConnection = Nothing +if objCmd.ActiveConnection Is Nothing Then + doUnitTest = "OK" ' no error +Else + doUnitTest = "Fail - expected objCmd.ActiveConnection be Nothing" +End If +End Function |