summaryrefslogtreecommitdiff
path: root/basic/qa
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-07-02 20:44:27 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-07-02 21:53:39 +0200
commit357c0e2a4a07aca48a69fbc2616b7002401b3267 (patch)
treead8cef8bf3e4dbbfec37ba3cc165455a33e11514 /basic/qa
parent4f8748fc973acdb67790ff048a247717afa9b9c7 (diff)
Move utility code out of test directories
This simplifies iteration over the test files, and avoids relying on file URLs being the same (e.g., having no /./ segments). Change-Id: I227785806e474a3a2dffeb46df21617eae43327e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118329 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'basic/qa')
-rw-r--r--basic/qa/cppunit/_test_asserts.bas (renamed from basic/qa/basic_coverage/_test_asserts.bas)0
-rw-r--r--basic/qa/cppunit/_test_asserts.vb (renamed from basic/qa/vba_tests/_test_asserts.vb)0
-rw-r--r--basic/qa/cppunit/basic_coverage.cxx4
-rw-r--r--basic/qa/cppunit/test_vba.cxx2
4 files changed, 3 insertions, 3 deletions
diff --git a/basic/qa/basic_coverage/_test_asserts.bas b/basic/qa/cppunit/_test_asserts.bas
index 0ecbf6828bcd..0ecbf6828bcd 100644
--- a/basic/qa/basic_coverage/_test_asserts.bas
+++ b/basic/qa/cppunit/_test_asserts.bas
diff --git a/basic/qa/vba_tests/_test_asserts.vb b/basic/qa/cppunit/_test_asserts.vb
index 0f1d0d88610f..0f1d0d88610f 100644
--- a/basic/qa/vba_tests/_test_asserts.vb
+++ b/basic/qa/cppunit/_test_asserts.vb
diff --git a/basic/qa/cppunit/basic_coverage.cxx b/basic/qa/cppunit/basic_coverage.cxx
index 22ce4e52b6b5..0f0722917232 100644
--- a/basic/qa/cppunit/basic_coverage.cxx
+++ b/basic/qa/cppunit/basic_coverage.cxx
@@ -64,7 +64,7 @@ void Coverage::process_directory(const OUString& sDirName)
osl::Directory aDir(sDirName);
osl::DirectoryItem aItem;
osl::FileStatus aFileStatus(osl_FileStatus_Mask_FileURL|osl_FileStatus_Mask_Type);
- OUString sMacroUtilsURL = m_directories.getURLFromSrc(u"basic/qa/basic_coverage/") + "_test_asserts.bas";
+ OUString sMacroUtilsURL = m_directories.getURLFromSrc(u"basic/qa/cppunit/_test_asserts.bas");
if(aDir.open() == osl::FileBase::E_None)
{
@@ -74,7 +74,7 @@ void Coverage::process_directory(const OUString& sDirName)
if(aFileStatus.isRegular())
{
OUString sFileURL = aFileStatus.getFileURL();
- if(sFileURL.endsWith(".bas") && sFileURL != sMacroUtilsURL)
+ if (sFileURL.endsWith(".bas"))
{
MacroSnippet testMacro;
testMacro.LoadSourceFromFile("TestUtil", sMacroUtilsURL);
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index 9a3cbe8baab9..8c43575f8f51 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -146,7 +146,7 @@ void VBATest::testMiscVBAFunctions()
"win32compatb.vb" // same methods, different signatures.
};
OUString sMacroPathURL = m_directories.getURLFromSrc(u"/basic/qa/vba_tests/");
- OUString sMacroUtilsURL = sMacroPathURL + "_test_asserts.vb";
+ OUString sMacroUtilsURL = m_directories.getURLFromSrc(u"/basic/qa/cppunit/_test_asserts.vb");
// Some test data expects the uk locale
LanguageTag aLocale(LANGUAGE_ENGLISH_UK);
SvtSysLocaleOptions aLocalOptions;