cool#10610 Ensure the parent-child relations of comments.
[LibreOffice.git] / basic / qa / vba_tests / strcomp.vb
blob0c77577c19218fd1e637e0ff9632e085cf1a52c8
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 VBASupport 1
10 Option Explicit
12 Function doUnitTest() As String
13 TestUtil.TestInit
14 verify_testSTRcomp
15 doUnitTest = TestUtil.GetResult()
16 End Function
18 Sub verify_testSTRcomp()
19 On Error GoTo errorHandler
21 TestUtil.AssertEqual(StrComp("ABCD", "abcd", vbTextCompare), 0, "StrComp(""ABCD"", ""abcd"", vbTextCompare)")
22 TestUtil.AssertEqual(StrComp("ABCD", "abcd", vbBinaryCompare), -1, "StrComp(""ABCD"", ""abcd"", vbBinaryCompare)")
23 TestUtil.AssertEqual(StrComp("ABCD", "abcd"), -1, "StrComp(""ABCD"", ""abcd"")")
24 TestUtil.AssertEqual(StrComp("text", "text", vbBinaryCompare), 0, "StrComp(""text"", ""text"", vbBinaryCompare)")
25 TestUtil.AssertEqual(StrComp("text ", "text", vbBinaryCompare), 1, "StrComp(""text "", ""text"", vbBinaryCompare)")
26 TestUtil.AssertEqual(StrComp("Text", "text", vbBinaryCompare), -1, "StrComp(""Text"", ""text"", vbBinaryCompare)")
27 TestUtil.AssertEqual(StrComp("text", "text", vbTextCompare), 0, "StrComp(""text"", ""text"", vbTextCompare)")
28 TestUtil.AssertEqual(StrComp("text ", "text", vbTextCompare), 1, "StrComp(""text "", ""text"", vbTextCompare)")
29 TestUtil.AssertEqual(StrComp("Text", "text", vbTextCompare), 0, "StrComp(""Text"", ""text"", vbTextCompare)")
31 Exit Sub
32 errorHandler:
33 TestUtil.ReportErrorHandler("verify_testSTRcomp", Err, Error$, Erl)
34 End Sub