tdf#154285 Check upper bound of arguments in SbRtl_Minute function
[LibreOffice.git] / basic / qa / basic_coverage / test_declare_from_dll.bas
blob7bdd1b170492bd4f9e951223f29af2e2794d781c
2 ' This file is part of the LibreOffice project.
4 ' This Source Code Form is subject to the terms of the Mozilla Public
5 ' License, v. 2.0. If a copy of the MPL was not distributed with this
6 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 Option Explicit
11 ' We link to shlwapi in many places, so safe to rely on it here
12 Declare Function PathFindExtensionA Lib "Shlwapi" (ByVal pszPath As String) As String
14 Function doUnitTest() As String
15 TestUtil.TestInit
16 verify_testPathFindExtensionA
17 doUnitTest = TestUtil.GetResult()
18 End Function
20 Sub verify_testPathFindExtensionA()
21 On Error GoTo errorHandler
23 ' Only test on Windows
24 If (GetGUIType() <> 1) Then
25 TestUtil.Assert(True) ' The test passed
26 Exit Sub
27 End If
29 ' Without the fix for tdf#147364 in place, the next call would crash in 64-bit version with
30 ' *** Exception 0xc0000005 occurred ***
31 TestUtil.AssertEqual(PathFindExtensionA("filename.ext"), ".ext", "PathFindExtensionA(""filename.ext"")")
33 Exit Sub
34 errorHandler:
35 TestUtil.ReportErrorHandler("verify_testPathFindExtensionA", Err, Error$, Erl)
36 End Sub