summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-12-30 22:23:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-01-23 20:33:19 +0000
commit4e00df4f0b05b3d6c8f185e08499d40964e7182f (patch)
tree2198947bd1c27603babfc0db50a98d10b31c36d0 /basic
parentb7d02d7a5a374da3e01e0abc4022fba35daa1840 (diff)
Related fdo#87834: add 2 unit tests
Change-Id: I4735b15c9535dc17665629510fdafe3dd4086e0b Reviewed-on: https://gerrit.libreoffice.org/13708 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/basic_coverage/test_mid_CountNegative_3args.vb15
-rw-r--r--basic/qa/basic_coverage/test_mid_StartOutOfBounds_2args.vb15
2 files changed, 30 insertions, 0 deletions
diff --git a/basic/qa/basic_coverage/test_mid_CountNegative_3args.vb b/basic/qa/basic_coverage/test_mid_CountNegative_3args.vb
new file mode 100644
index 000000000000..d67370626165
--- /dev/null
+++ b/basic/qa/basic_coverage/test_mid_CountNegative_3args.vb
@@ -0,0 +1,15 @@
+'
+' 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/.
+'
+
+Function doUnitTest as Integer
+ If (Mid("abc", 5, -3) = "") Then
+ doUnitTest = 1
+ Else
+ doUnitTest = 0
+ End If
+End Function
diff --git a/basic/qa/basic_coverage/test_mid_StartOutOfBounds_2args.vb b/basic/qa/basic_coverage/test_mid_StartOutOfBounds_2args.vb
new file mode 100644
index 000000000000..5ab01f987bc7
--- /dev/null
+++ b/basic/qa/basic_coverage/test_mid_StartOutOfBounds_2args.vb
@@ -0,0 +1,15 @@
+'
+' 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/.
+'
+
+Function doUnitTest as Integer
+ If (Mid("abc", 5) = "") Then
+ doUnitTest = 1
+ Else
+ doUnitTest = 0
+ End If
+End Function