Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
1da0c806
Kaydet (Commit)
1da0c806
authored
Mar 23, 2015
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove trailing blanks rubbish
Change-Id: I97cee7ea1d63375b73f0d4003022e9f09ad38e5f
üst
68495ab3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
89 additions
and
89 deletions
+89
-89
bytearraystring.vb
basic/qa/vba_tests/bytearraystring.vb
+7
-7
dateserial.vb
basic/qa/vba_tests/dateserial.vb
+4
-4
format.vb
basic/qa/vba_tests/format.vb
+0
-0
ole_ObjAssignNoDflt.vb
basic/qa/vba_tests/ole_ObjAssignNoDflt.vb
+2
-2
partition.vb
basic/qa/vba_tests/partition.vb
+6
-6
replace.vb
basic/qa/vba_tests/replace.vb
+2
-2
strconv.vb
basic/qa/vba_tests/strconv.vb
+11
-11
stringplusdouble.vb
basic/qa/vba_tests/stringplusdouble.vb
+57
-57
No files found.
basic/qa/vba_tests/bytearraystring.vb
Dosyayı görüntüle @
1da0c806
...
...
@@ -30,24 +30,24 @@ Function verify_ByteArrayString() As String
Dim
x
()
As
Byte
Dim
count
As
Integer
testName
=
"Test the conversion between bytearray and string"
On
Error
GoTo
errorHandler
MyString
=
"abc"
x
=
MyString
' string -> byte array
result
=
"Test Results"
&
Chr
$
(
10
)
&
"============"
&
Chr
$
(
10
)
count
=
UBound
(
x
)
' 6 byte
' test bytes in string
result
=
result
+
updateResultString
(
"test1 numbytes "
,
(
count
),
5
)
MyString
=
x
'byte array -> string
result
=
result
+
updateResultString
(
"test assign byte array to string"
,
MyString
,
"abc"
)
result
=
result
&
Chr
$
(
10
)
&
"Tests passed: "
&
passCount
&
Chr
$
(
10
)
&
"Tests failed: "
&
failCount
&
Chr
$
(
10
)
verify_ByteArrayString
=
result
Exit
Function
...
...
basic/qa/vba_tests/dateserial.vb
Dosyayı görüntüle @
1da0c806
...
...
@@ -26,9 +26,9 @@ Function verify_testDateSerial() as String
testName
=
"Test DateSerial function"
date2
=
36326
On
Error
GoTo
errorHandler
date1
=
DateSerial
(
1999
,
6
,
15
)
'6/15/1999
TestLog_ASSERT
date1
=
date2
,
"the return date is: "
&
date1
date1
=
DateSerial
(
2000
,
1
-
7
,
15
)
'6/15/1999
...
...
@@ -36,7 +36,7 @@ Function verify_testDateSerial() as String
date1
=
DateSerial
(
1999
,
1
,
166
)
'6/15/1999
TestLog_ASSERT
date1
=
date2
,
"the return date is: "
&
date1
result
=
result
&
Chr
$
(
10
)
&
"Tests passed: "
&
passCount
&
Chr
$
(
10
)
&
"Tests failed: "
&
failCount
&
Chr
$
(
10
)
verify_testDateSerial
=
result
Exit
Function
...
...
@@ -60,6 +60,6 @@ Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional tes
result
=
result
&
Chr
$
(
10
)
&
" Failed: "
&
testMsg
failCount
=
failCount
+
1
End
If
End
Sub
basic/qa/vba_tests/format.vb
Dosyayı görüntüle @
1da0c806
This diff is collapsed.
Click to expand it.
basic/qa/vba_tests/ole_ObjAssignNoDflt.vb
Dosyayı görüntüle @
1da0c806
...
...
@@ -17,13 +17,13 @@ objCmd.ActiveConnection = cn
If
objCmd
.
ActiveConnection
.
CommandTimeout
<>
modifiedTimeout
Then
Rem if we copied the object by reference then we should have the
Rem modified timeout ( because we should be just pointing as cn )
doUnitTest
=
"FAIL expected modified timeout "
&
modifiedTimeout
&
" but got "
&
objCmd
.
ActiveConnection
.
CommandTimeout
doUnitTest
=
"FAIL expected modified timeout "
&
modifiedTimeout
&
" but got "
&
objCmd
.
ActiveConnection
.
CommandTimeout
Exit
Function
End
If
cn
.
CommandTimeout
=
origTimeout
' restore timeout
Rem Double check objCmd.ActiveConnection is pointing to objCmd.ActiveConnection
If
objCmd
.
ActiveConnection
.
CommandTimeout
<>
origTimeout
Then
doUnitTest
=
"FAIL expected orignal timeout "
&
origTimeout
&
" but got "
&
objCmd
.
ActiveConnection
.
CommandTimeout
doUnitTest
=
"FAIL expected orignal timeout "
&
origTimeout
&
" but got "
&
objCmd
.
ActiveConnection
.
CommandTimeout
Exit
Function
End
If
doUnitTest
=
"OK"
' no error
...
...
basic/qa/vba_tests/partition.vb
Dosyayı görüntüle @
1da0c806
...
...
@@ -24,23 +24,23 @@ Function verify_testPartition() as String
Dim
retStr
As
String
testName
=
"Test Partition function"
On
Error
GoTo
errorHandler
retStr
=
Partition
(
20
,
0
,
98
,
5
)
'MsgBox retStr
TestLog_ASSERT
retStr
=
"20:24"
,
"the number 20 occurs in the range:"
&
retStr
retStr
=
Partition
(
20
,
0
,
99
,
1
)
'MsgBox retStr
TestLog_ASSERT
retStr
=
" 20: 20"
,
"the number 20 occurs in the range:"
&
retStr
retStr
=
Partition
(
120
,
0
,
99
,
5
)
'MsgBox retStr
TestLog_ASSERT
retStr
=
"100: "
,
"the number 120 occurs in the range:"
&
retStr
retStr
=
Partition
(
-
5
,
0
,
99
,
5
)
'MsgBox retStr
TestLog_ASSERT
retStr
=
" : -1"
,
"the number -5 occurs in the range:"
&
retStr
retStr
=
Partition
(
2
,
0
,
5
,
2
)
'MsgBox retStr
TestLog_ASSERT
retStr
=
" 2: 3"
,
"the number 2 occurs in the range:"
&
retStr
...
...
@@ -67,5 +67,5 @@ Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional tes
result
=
result
&
Chr
$
(
10
)
&
" Failed: "
&
testMsg
failCount
=
failCount
+
1
End
If
End
Sub
basic/qa/vba_tests/replace.vb
Dosyayı görüntüle @
1da0c806
...
...
@@ -44,7 +44,7 @@ Function verify_testReplace() as String
TestLog_ASSERT
retStr
=
"abcbcdBc"
,
"start = 1, count = 0, not support in Unix: "
&
retStr
result
=
result
&
Chr
$
(
10
)
&
"Tests passed: "
&
passCount
&
Chr
$
(
10
)
&
"Tests failed: "
&
failCount
&
Chr
$
(
10
)
verify_testReplace
=
result
Exit
Function
errorHandler
:
TestLog_ASSERT
(
False
),
testName
&
": hit error handler"
...
...
@@ -66,5 +66,5 @@ Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional tes
result
=
result
&
Chr
$
(
10
)
&
" Failed: "
&
testMsg
failCount
=
failCount
+
1
End
If
End
Sub
basic/qa/vba_tests/strconv.vb
Dosyayı görüntüle @
1da0c806
...
...
@@ -25,43 +25,43 @@ Function verify_testStrConv() as String
srcStr
=
"abc EFG hij"
testName
=
"Test StrConv function"
On
Error
GoTo
errorHandler
retStr
=
StrConv
(
srcStr
,
vbUpperCase
)
'MsgBox retStr
TestLog_ASSERT
retStr
=
"ABC EFG HIJ"
,
"Converts the string to uppercase characters:"
&
retStr
retStr
=
StrConv
(
srcStr
,
vbLowerCase
)
'MsgBox retStr
TestLog_ASSERT
retStr
=
"abc efg hij"
,
"Converts the string to lowercase characters:"
&
retStr
retStr
=
StrConv
(
srcStr
,
vbProperCase
)
'MsgBox retStr
TestLog_ASSERT
retStr
=
"Abc Efg Hij"
,
"Converts the first letter of every word in string to uppercase:"
&
retStr
'retStr = StrConv("ABCDEVB¥ì¥¹¥¥å©`", vbWide)
'MsgBox retStr
'TestLog_ASSERT retStr = "£Á£Â£Ã£Ä£ÅVB¥ì¥¹¥¥å©`", "Converts narrow (single-byte) characters in string to wide"
'retStr = StrConv("£Á£Â£Ã£Ä£ÅVB¥ì¥¹¥¥å©`", vbNarrow)
'MsgBox retStr
'TestLog_ASSERT retStr = "ABCDEVB¥ì¥¹¥¥å©`", "Converts wide (double-byte) characters in string to narrow (single-byte) characters." & retStr
'retStr = StrConv("¤Ï¤Ê¤Á¤ã¤ó", vbKatakana)
'MsgBox retStr
'TestLog_ASSERT retStr = "¥Ï¥Ê¥Á¥ã¥ó", "Converts Hiragana characters in string to Katakana characters.." & retStr
' retStr = StrConv("¥Ï¥Ê¥Á¥ã¥ó", vbHiragana)
'MsgBox retStr
' TestLog_ASSERT retStr = "¤Ï¤Ê¤Á¤ã¤ó", "Converts Katakana characters in string to Hiragana characters.." & retStr
'x = StrConv("ÉϺ£ÊÐABC", vbFromUnicode)
'MsgBox retStr
'TestLog_ASSERT UBound(x) = 8, "Converts the string from Unicode, the length is : " & UBound(x) + 1
' retStr = StrConv(x, vbUnicode)
'MsgBox retStr
' TestLog_ASSERT retStr = "ÉϺ£ÊÐABC", "Converts the string to Unicode: " & retStr
result
=
result
&
Chr
$
(
10
)
&
"Tests passed: "
&
passCount
&
Chr
$
(
10
)
&
"Tests failed: "
&
failCount
&
Chr
$
(
10
)
verify_testStrConv
=
result
...
...
@@ -86,5 +86,5 @@ Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional tes
result
=
result
&
Chr
$
(
10
)
&
" Failed: "
&
testMsg
failCount
=
failCount
+
1
End
If
End
Sub
basic/qa/vba_tests/stringplusdouble.vb
Dosyayı görüntüle @
1da0c806
...
...
@@ -30,76 +30,76 @@ Sub DSD()
Dim
testName
As
String
testName
=
"double = string + double"
Dim
testCompute
As
String
Dim
s
As
String
Dim
d
As
Double
Dim
r
As
Double
On
Error
GoTo
ErrorHandler
testCompute
=
"s = null, d = null, r = s + d"
r
=
s
+
d
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = null, d = null, r = s & d"
r
=
s
&
d
TestLog_ASSERT
r
=
0
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = null, d = 20, r = s + d"
d
=
20
r
=
s
+
d
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = null, d = 20, r = s & d"
d
=
20
r
=
s
&
d
TestLog_ASSERT
r
=
20
,
testCompute
&
" .The result is: "
&
r
''''''''''''''
s
=
"10"
Dim
d2
As
Double
testCompute
=
"s = '10', d = null, r = s + d"
r
=
s
+
d2
TestLog_ASSERT
r
=
10
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = '10', d = null, r = s & d"
r
=
s
&
d2
TestLog_ASSERT
r
=
100
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = '10', d = 20, r = s + d"
d2
=
20
r
=
s
+
d2
TestLog_ASSERT
r
=
30
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = '10', d = 20, r = s & d"
d2
=
20
r
=
s
&
d2
TestLog_ASSERT
r
=
1020
,
testCompute
&
" .The result is: "
&
r
''''''''''''''
s
=
"abc"
Dim
d3
As
Double
testCompute
=
"s = 'abc', d = null, r = s + d"
r
=
s
+
d3
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = 'abc', d = null, r = s & d"
r
=
s
&
d3
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = 'abc', d = 20, r = s + d"
d3
=
20
r
=
s
+
d3
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = 'abc', d = 20, r = s & d"
d3
=
20
r
=
s
&
d3
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
Exit
Sub
ErrorHandler
:
r
=
-
1
' TestLog_Comment "The next compute raises error: " & testCompute
...
...
@@ -111,75 +111,75 @@ Sub SSD()
Dim
testName
As
String
testName
=
"string = string + double"
Dim
testCompute
As
String
Dim
s
As
String
Dim
d
As
Double
Dim
r
As
String
On
Error
GoTo
ErrorHandler
testCompute
=
"s = null, d = null, r = s + d"
r
=
s
+
d
TestLog_ASSERT
r
=
"-1"
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = null, d = null, r = s & d"
r
=
s
&
d
TestLog_ASSERT
r
=
"0"
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = null, d = 20, r = s + d"
d
=
20
r
=
s
+
d
TestLog_ASSERT
r
=
"-1"
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = null, d = 20, r = s & d"
d
=
20
r
=
s
&
d
TestLog_ASSERT
r
=
"20"
,
testCompute
&
" .The result is: "
&
r
''''''''''''''
s
=
"10"
Dim
d2
As
Double
testCompute
=
"s = '10', d = null, r = s + d"
r
=
s
+
d2
TestLog_ASSERT
r
=
"10"
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = '10', d = null, r = s & d"
r
=
s
&
d2
TestLog_ASSERT
r
=
"100"
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = '10', d = 20, r = s + d"
d2
=
20
r
=
s
+
d2
TestLog_ASSERT
r
=
"30"
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = '10', d = 20, r = s & d"
d2
=
20
r
=
s
&
d2
TestLog_ASSERT
r
=
"1020"
,
testCompute
&
" .The result is: "
&
r
''''''''''''''
s
=
"abc"
Dim
d3
As
Double
testCompute
=
"s = 'abc', d = null, r = s + d"
r
=
s
+
d3
TestLog_ASSERT
r
=
"-1"
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = 'abc', d = null, r = s & d"
r
=
s
&
d3
TestLog_ASSERT
r
=
"abc0"
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = 'abc', d = 20, r = s + d"
d3
=
20
r
=
s
+
d3
TestLog_ASSERT
r
=
"-1"
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = 'abc', d = 20, r = s & d"
d3
=
20
r
=
s
&
d3
TestLog_ASSERT
r
=
"abc20"
,
testCompute
&
" .The result is: "
&
r
Exit
Sub
ErrorHandler
:
r
=
"-1"
' TestLog_Comment "The next compute raises error: " & testCompute
...
...
@@ -190,75 +190,75 @@ Sub DSS()
Dim
testName
As
String
testName
=
"double = string + string"
Dim
testCompute
As
String
Dim
s
As
String
Dim
d
As
String
Dim
r
As
Double
On
Error
GoTo
ErrorHandler
testCompute
=
"s = null, d = null, r = s + d"
r
=
s
+
d
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = null, d = null, r = s & d"
r
=
s
&
d
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = null, d = 20, r = s + d"
d
=
"20"
r
=
s
+
d
TestLog_ASSERT
r
=
20
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = null, d = 20, r = s & d"
d
=
"20"
r
=
s
&
d
TestLog_ASSERT
r
=
20
,
testCompute
&
" .The result is: "
&
r
''''''''''''''
s
=
"10"
Dim
d2
As
String
testCompute
=
"s = '10', d = null, r = s + d"
r
=
s
+
d2
TestLog_ASSERT
r
=
10
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = '10', d = null, r = s & d"
r
=
s
&
d2
TestLog_ASSERT
r
=
10
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = '10', d = 20, r = s + d"
d2
=
"20"
r
=
s
+
d2
TestLog_ASSERT
r
=
1020
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = '10', d = 20, r = s & d"
d2
=
"20"
r
=
s
&
d2
TestLog_ASSERT
r
=
1020
,
testCompute
&
" .The result is: "
&
r
''''''''''''''
s
=
"abc"
Dim
d3
As
String
testCompute
=
"s = 'abc', d = null, r = s + d"
r
=
s
+
d3
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = 'abc', d = null, r = s & d"
r
=
s
&
d3
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = 'abc', d = 20, r = s + d"
d3
=
"20"
r
=
s
+
d3
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
testCompute
=
"s = 'abc', d = 20, r = s & d"
d3
=
"20"
r
=
s
&
d3
TestLog_ASSERT
r
=
-
1
,
testCompute
&
" .The result is: "
&
r
Exit
Sub
ErrorHandler
:
r
=
-
1
' TestLog_Comment "The next compute raises error: " & testCompute
...
...
@@ -280,13 +280,13 @@ Sub testBolean()
Dim
b
As
Boolean
Dim
c
As
Boolean
Dim
d
As
String
b
=
True
a
=
"1"
c
=
a
+
b
' c = false
MsgBox
c
d
=
a
+
b
'd = 0
MsgBox
d
End
Sub
...
...
@@ -296,16 +296,16 @@ Sub testCurrency()
Dim
b
As
Currency
Dim
c
As
Currency
Dim
d
As
String
a
=
"10"
b
=
30.3
c
=
a
+
b
' c = 40.3
MsgBox
c
d
=
a
+
b
' c =40.3
MsgBox
d
End
Sub
Sub
TestLog_ASSERT
(
assertion
As
Boolean
,
Optional
testId
As
String
,
Optional
testComment
As
String
)
...
...
@@ -324,5 +324,5 @@ Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional tes
result
=
result
&
Chr
$
(
10
)
&
" Failed: "
&
testMsg
failCount
=
failCount
+
1
End
If
End
Sub
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment