basic/qa/basic_coverage/test_CallByName.bas | 7 basic/qa/basic_coverage/test_ismissing_basic.bas | 7 basic/qa/basic_coverage/test_ismissing_cascade.bas | 7 basic/qa/basic_coverage/test_ismissing_compatible.bas | 7 basic/qa/basic_coverage/test_option_base.bas | 7 basic/qa/basic_coverage/test_option_base_compatible.bas | 7 basic/qa/basic_coverage/test_optional_paramter_type.bas | 74 +++++----- basic/qa/basic_coverage/test_optional_paramters_basic.bas | 7 basic/qa/basic_coverage/test_optional_paramters_compatible.bas | 7 basic/qa/basic_coverage/test_string_overflow_safe.bas | 7 basic/qa/basic_coverage/test_string_replace.bas | 7 basic/qa/basic_coverage/test_tdf134692.bas | 7 basic/qa/basic_coverage/test_tdf98778.bas | 7 13 files changed, 124 insertions(+), 34 deletions(-)
New commits: commit 5f0cf6e7aa75e8724e13e731be09271c7e536e93 Author: Xisco Fauli <[email protected]> AuthorDate: Mon Dec 19 17:53:00 2022 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Dec 20 08:41:11 2022 +0000 basic: add missing license statement in test files While at it, convert test_optional_paramter_type.bas to Unix format Change-Id: I141fa0a00d6b6784c3a84c8b3041086d51e5cdbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144540 Tested-by: Xisco Fauli <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> diff --git a/basic/qa/basic_coverage/test_CallByName.bas b/basic/qa/basic_coverage/test_CallByName.bas index 35578ee475c0..3eca805fb1a9 100644 --- a/basic/qa/basic_coverage/test_CallByName.bas +++ b/basic/qa/basic_coverage/test_CallByName.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option Explicit Function doUnitTest() As String diff --git a/basic/qa/basic_coverage/test_ismissing_basic.bas b/basic/qa/basic_coverage/test_ismissing_basic.bas index ed43a3ad19ee..0996da0f82a4 100644 --- a/basic/qa/basic_coverage/test_ismissing_basic.bas +++ b/basic/qa/basic_coverage/test_ismissing_basic.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Const IsMissingNone = -1 Const IsMissingA = 0 Const IsMissingB = 1 diff --git a/basic/qa/basic_coverage/test_ismissing_cascade.bas b/basic/qa/basic_coverage/test_ismissing_cascade.bas index f2f3a8b20564..3c6d9a71c09a 100644 --- a/basic/qa/basic_coverage/test_ismissing_cascade.bas +++ b/basic/qa/basic_coverage/test_ismissing_cascade.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option Explicit Function doUnitTest() As String diff --git a/basic/qa/basic_coverage/test_ismissing_compatible.bas b/basic/qa/basic_coverage/test_ismissing_compatible.bas index fb7e6981d74c..6d11ab0902be 100644 --- a/basic/qa/basic_coverage/test_ismissing_compatible.bas +++ b/basic/qa/basic_coverage/test_ismissing_compatible.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option Compatible Option Explicit Const IsMissingNone = -1 diff --git a/basic/qa/basic_coverage/test_option_base.bas b/basic/qa/basic_coverage/test_option_base.bas index 11afea50d75b..69282f80bec6 100644 --- a/basic/qa/basic_coverage/test_option_base.bas +++ b/basic/qa/basic_coverage/test_option_base.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option Base 1 Option Explicit diff --git a/basic/qa/basic_coverage/test_option_base_compatible.bas b/basic/qa/basic_coverage/test_option_base_compatible.bas index 8001106a7bfc..296b208f582b 100644 --- a/basic/qa/basic_coverage/test_option_base_compatible.bas +++ b/basic/qa/basic_coverage/test_option_base_compatible.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option Base 1 Option Compatible Option Explicit diff --git a/basic/qa/basic_coverage/test_optional_paramter_type.bas b/basic/qa/basic_coverage/test_optional_paramter_type.bas index 2a616c24044d..a98e422cd004 100644 --- a/basic/qa/basic_coverage/test_optional_paramter_type.bas +++ b/basic/qa/basic_coverage/test_optional_paramter_type.bas @@ -1,34 +1,40 @@ -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 \ No newline at end of file +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + +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 diff --git a/basic/qa/basic_coverage/test_optional_paramters_basic.bas b/basic/qa/basic_coverage/test_optional_paramters_basic.bas index 40475664fb7a..82880e11bdde 100644 --- a/basic/qa/basic_coverage/test_optional_paramters_basic.bas +++ b/basic/qa/basic_coverage/test_optional_paramters_basic.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option Explicit Type testObject diff --git a/basic/qa/basic_coverage/test_optional_paramters_compatible.bas b/basic/qa/basic_coverage/test_optional_paramters_compatible.bas index fc3ca385951c..78d14eb152eb 100644 --- a/basic/qa/basic_coverage/test_optional_paramters_compatible.bas +++ b/basic/qa/basic_coverage/test_optional_paramters_compatible.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option Compatible Option Explicit diff --git a/basic/qa/basic_coverage/test_string_overflow_safe.bas b/basic/qa/basic_coverage/test_string_overflow_safe.bas index f245e14abc4e..0b4fec15f0bd 100644 --- a/basic/qa/basic_coverage/test_string_overflow_safe.bas +++ b/basic/qa/basic_coverage/test_string_overflow_safe.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option Explicit Function doUnitTest As String diff --git a/basic/qa/basic_coverage/test_string_replace.bas b/basic/qa/basic_coverage/test_string_replace.bas index d68f36fbb662..2b0f6354cd04 100644 --- a/basic/qa/basic_coverage/test_string_replace.bas +++ b/basic/qa/basic_coverage/test_string_replace.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option VBASupport 0 Option Explicit diff --git a/basic/qa/basic_coverage/test_tdf134692.bas b/basic/qa/basic_coverage/test_tdf134692.bas index c310280fecdb..1f389f06cc86 100644 --- a/basic/qa/basic_coverage/test_tdf134692.bas +++ b/basic/qa/basic_coverage/test_tdf134692.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option VBASupport 0 Option Explicit diff --git a/basic/qa/basic_coverage/test_tdf98778.bas b/basic/qa/basic_coverage/test_tdf98778.bas index 0228e5060ba8..451d4bde70bc 100644 --- a/basic/qa/basic_coverage/test_tdf98778.bas +++ b/basic/qa/basic_coverage/test_tdf98778.bas @@ -1,3 +1,10 @@ +' This file is part of the LibreOffice project. +' +' This Source Code Form is subject to the terms of the Mozilla Public +' License, v. 2.0. If a copy of the MPL was not distributed with this +' file, You can obtain one at http://mozilla.org/MPL/2.0/. +' + Option VBASupport 0 Option Explicit
