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
b279360e
Kaydet (Commit)
b279360e
authored
Mar 15, 2013
tarafından
Noel Power
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
unittest and test data for bnc#809017
Change-Id: I3ccae692db44bb3ce41b371f0b511a9db7181bf4
üst
c90373f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
test_vba.cxx
basic/qa/cppunit/test_vba.cxx
+4
-3
ole_dfltObjDflMethod.vb
basic/qa/vba_tests/ole_dfltObjDflMethod.vb
+24
-0
No files found.
basic/qa/cppunit/test_vba.cxx
Dosyayı görüntüle @
b279360e
...
...
@@ -22,7 +22,7 @@ namespace
VBATest
()
:
BootstrapFixture
(
true
,
false
)
{}
~
VBATest
(){}
void
testMiscVBAFunctions
();
void
test
ObjAssignWithDefaultMember
();
void
test
MiscOLEStuff
();
// Adds code needed to register the test suite
CPPUNIT_TEST_SUITE
(
VBATest
);
...
...
@@ -30,7 +30,7 @@ namespace
CPPUNIT_TEST
(
testMiscVBAFunctions
);
// not much point even trying to run except on windows
#if defined(WNT)
CPPUNIT_TEST
(
test
ObjAssignWithDefaultMember
);
CPPUNIT_TEST
(
test
MiscOLEStuff
);
#endif
// End of test suite definition
...
...
@@ -105,7 +105,7 @@ void VBATest::testMiscVBAFunctions()
}
}
void
VBATest
::
test
ObjAssignWithDefaultMember
()
void
VBATest
::
test
MiscOLEStuff
()
{
bool
bCanRunOleTests
=
hasOLEEnv
();
if
(
!
bCanRunOleTests
)
...
...
@@ -114,6 +114,7 @@ void VBATest::testObjAssignWithDefaultMember()
const
char
*
macroSource
[]
=
{
"ole_ObjAssignNoDflt.vb"
,
"ole_ObjAssignToNothing.vb"
,
"ole_dfltObjDflMethod.vb"
,
};
OUString
sMacroPathURL
=
getURLFromSrc
(
"/basic/qa/vba_tests/"
);
...
...
basic/qa/vba_tests/ole_dfltObjDflMethod.vb
0 → 100644
Dosyayı görüntüle @
b279360e
Option
VBASupport
1
Option
Explicit
Rem Test accessing an object that has default object member
Rem which in turn has a default member that is a method
Function
doUnitTest
(
TestData
As
String
)
As
String
doUnitTest
=
"Begin"
Dim
modifiedTimout
As
Long
Dim
cnn1
As
New
ADODB
.
Connection
Dim
rst1
As
New
ADODB
.
Recordset
Dim
conStr
As
String
cnn1
.
Open
"Provider=Microsoft.Jet.OLEDB.4.0;"
&
_
"Data Source="
&
TestData
&
";"
&
_
"Extended Properties=
""
Excel 8.0;HDR=Yes
""
;"
rst1
.
Open
"SELECT * FROM [Sheet1$];"
,
cnn1
,
adOpenStatic
,
adLockReadOnly
Dim
val
val
=
rst1
(
"FirstName"
)
If
val
=
"Paddy"
Then
doUnitTest
=
"OK"
Else
doUnitTest
=
"Failed, expected 'Paddy' got "
&
val
End
If
End
Function
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