summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2023-09-03 13:33:13 +0300
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2023-09-03 13:22:55 +0200
commit115c8b42b8db7882f3e10e7ff1ef2f48d3ef973c (patch)
tree81f53d181610debbfcd3231591b8f567fd1a3415 /basic
parentb3278aa41d036a7fd9f3a8ce9aa683397e87e6a8 (diff)
Revert "tdf#130924 replace '*printf' with 'SAL_*' logging macros."
My mistake, did not notice https://bugs.documentfoundation.org/show_bug.cgi?id=130924#c5 We shouldn't hide test output. This reverts commit df0db4132428e95d276e923d8d5fb603dbb7f7bb. Change-Id: Ieac40effb57333322f8db8ead093a83765d17a09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156479 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/basic_coverage.cxx7
-rw-r--r--basic/qa/cppunit/basictest.cxx8
-rw-r--r--basic/qa/cppunit/test_vba.cxx11
3 files changed, 14 insertions, 12 deletions
diff --git a/basic/qa/cppunit/basic_coverage.cxx b/basic/qa/cppunit/basic_coverage.cxx
index ee36f2d1309f..0f0722917232 100644
--- a/basic/qa/cppunit/basic_coverage.cxx
+++ b/basic/qa/cppunit/basic_coverage.cxx
@@ -81,15 +81,16 @@ void Coverage::process_directory(const OUString& sDirName)
testMacro.LoadSourceFromFile("TestModule", sFileURL);
SbxVariableRef pReturn = testMacro.Run();
CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is());
- SAL_INFO("basic.qa", "macro result for " << sFileURL);
- SAL_INFO("basic.qa", "macro returned:\n" << pReturn->GetOUString());
+ fprintf(stderr, "macro result for %s\n", OUStringToOString(sFileURL,RTL_TEXTENCODING_UTF8).getStr());
+ fprintf(stderr, "macro returned:\n%s\n",
+ OUStringToOString(pReturn->GetOUString(), RTL_TEXTENCODING_UTF8).getStr());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"),
pReturn->GetOUString());
}
}
}
}
- SAL_INFO("basic.qa", "end process directory");
+ fprintf(stderr,"end process directory\n");
}
void Coverage::Coverage_Iterator()
diff --git a/basic/qa/cppunit/basictest.cxx b/basic/qa/cppunit/basictest.cxx
index ebf39635620a..8cf9812d5212 100644
--- a/basic/qa/cppunit/basictest.cxx
+++ b/basic/qa/cppunit/basictest.cxx
@@ -7,7 +7,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <sal/log.hxx>
#include "basictest.hxx"
#include <cppunit/plugin/TestPlugIn.h>
#include <basic/sbstar.hxx>
@@ -43,7 +42,7 @@ MacroSnippet::MacroSnippet()
void MacroSnippet::LoadSourceFromFile(const OUString& sModuleName, const OUString& sMacroFileURL)
{
OUString sSource;
- SAL_INFO("basic.qa", "loadSource opening macro file" << sMacroFileURL);
+ fprintf(stderr,"loadSource opening macro file %s\n", OUStringToOString( sMacroFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
osl::File aFile(sMacroFileURL);
if(aFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None)
@@ -113,8 +112,9 @@ const ErrCode& MacroSnippet::getError() const { return maErrCode; }
IMPL_LINK( MacroSnippet, BasicErrorHdl, StarBASIC *, /*pBasic*/, bool)
{
- SAL_INFO("basic.qa", '(' << StarBASIC::GetLine() << ':' << StarBASIC::GetCol1() << ")");
- SAL_INFO("basic.qa", "Basic error: " << StarBASIC::GetErrorText());
+ fprintf(stderr,"(%d:%d)\n",
+ StarBASIC::GetLine(), StarBASIC::GetCol1());
+ fprintf(stderr,"Basic error: %s\n", OUStringToOString( StarBASIC::GetErrorText(), RTL_TEXTENCODING_UTF8 ).getStr() );
mbError = true;
maErrCode = StarBASIC::GetErrorCode();
return false;
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index a95e2db6a7bd..8a15ba7234e8 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -6,7 +6,6 @@
* 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/.
*/
-#include <sal/log.hxx>
#include "basictest.hxx"
#include <unotools/syslocaleoptions.hxx>
@@ -169,8 +168,9 @@ void VBATest::testMiscVBAFunctions()
myMacro.LoadSourceFromFile("TestModule", sMacroURL);
SbxVariableRef pReturn = myMacro.Run();
CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is());
- SAL_INFO("basic.qa", "macro result for" << macroSource[i]);
- SAL_INFO("basic.qa", "macro returned:\n" << pReturn->GetOUString());
+ fprintf(stderr, "macro result for %s\n", macroSource[i]);
+ fprintf(stderr, "macro returned:\n%s\n",
+ OUStringToOString(pReturn->GetOUString(), RTL_TEXTENCODING_UTF8).getStr());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"),
pReturn->GetOUString());
}
@@ -248,8 +248,9 @@ void VBATest::testMiscOLEStuff()
myMacro.LoadSourceFromFile("TestModule", sMacroURL);
SbxVariableRef pReturn = myMacro.Run( aArgs );
CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is());
- SAL_INFO("basic.qa", "macro result for" << macroSource[i]);
- SAL_INFO("basic.qa", "macro returned:\n" << pReturn->GetOUString());
+ fprintf(stderr, "macro result for %s\n", macroSource[i]);
+ fprintf(stderr, "macro returned:\n%s\n",
+ OUStringToOString(pReturn->GetOUString(), RTL_TEXTENCODING_UTF8).getStr());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"),
pReturn->GetOUString());
}