summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-03-07 10:48:50 +0000
committerNoel Power <noel.power@suse.com>2013-03-07 10:56:44 +0000
commit49417b0b68e8c9743bd6f664a5f8b4a0f3c19723 (patch)
tree775413ae63b2ef099b40a4a8864f2465c39d0beb /basic
parenta9fc6ee7dc640f016728bf524d684696a376e989 (diff)
use "doUnitTest" as the method to search for, tweak error reporting
Change-Id: I0c0f4ce1304b561bf94af5444c83d8920062568b
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/basictest.hxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx
index d94abbfd4cda..7e74a2aa7117 100644
--- a/basic/qa/cppunit/basictest.hxx
+++ b/basic/qa/cppunit/basictest.hxx
@@ -89,7 +89,7 @@ class MacroSnippet
void LoadSourceFromFile( const OUString& sMacroFileURL )
{
OUString sSource;
- printf("loadSource opening macro file %s\n", OUStringToOString( sMacroFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ fprintf(stderr,"loadSource opening macro file %s\n", OUStringToOString( sMacroFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
osl::File aFile(sMacroFileURL);
if(osl::FileBase::E_None == aFile.open(osl_File_OpenFlag_Read))
@@ -119,7 +119,7 @@ class MacroSnippet
SbxVariableRef pReturn = NULL;
if ( !Compile() )
return pReturn;
- SbMethod* pMeth = mpMod ? static_cast<SbMethod*>(mpMod->Find( OUString("test"), SbxCLASS_METHOD )) : NULL;
+ SbMethod* pMeth = mpMod ? static_cast<SbMethod*>(mpMod->Find( OUString("doUnitTest"), SbxCLASS_METHOD )) : NULL;
if ( pMeth )
{
if ( rArgs.getLength() )
@@ -179,7 +179,9 @@ class MacroSnippet
IMPL_LINK( MacroSnippet, BasicErrorHdl, StarBASIC *, /*pBasic*/)
{
- fprintf(stderr,"Got error: \n\t%s!!!\n", OUStringToOString( StarBASIC::GetErrorText(), RTL_TEXTENCODING_UTF8 ).getStr() );
+ fprintf(stderr,"(%d:%d)\n",
+ StarBASIC::GetLine(), StarBASIC::GetCol1());
+ fprintf(stderr,"Basic error: %s\n", rtl::OUStringToOString( StarBASIC::GetErrorText(), RTL_TEXTENCODING_UTF8 ).getStr() );
mbError = true;
return 0;
}