From 6c87571125fbddf4215160f07894b7063f834b34 Mon Sep 17 00:00:00 2001 From: Robert Antoni Buj i Gelonch Date: Sun, 21 Sep 2014 13:50:27 +0200 Subject: javaunohelper: use java.util.logging in tests Change-Id: Icdc61dc88a11afae5257bcddda32adb691cb5883 Reviewed-on: https://gerrit.libreoffice.org/11564 Reviewed-by: Chris Sherlock Tested-by: Chris Sherlock --- .../com/sun/star/comp/helper/Bootstrap_Test.java | 21 +-- .../star/lib/uno/helper/ComponentBase_Test.java | 40 ++--- .../lib/uno/helper/InterfaceContainer_Test.java | 197 +++++++-------------- .../helper/MultiTypeInterfaceContainer_Test.java | 69 +++----- .../sun/star/lib/uno/helper/PropertySet_Test.java | 104 ++++------- .../com/sun/star/lib/uno/helper/WeakBase_Test.java | 38 ++-- 6 files changed, 168 insertions(+), 301 deletions(-) (limited to 'javaunohelper/test') diff --git a/javaunohelper/test/com/sun/star/comp/helper/Bootstrap_Test.java b/javaunohelper/test/com/sun/star/comp/helper/Bootstrap_Test.java index 57724be79300..184515d47d8b 100644 --- a/javaunohelper/test/com/sun/star/comp/helper/Bootstrap_Test.java +++ b/javaunohelper/test/com/sun/star/comp/helper/Bootstrap_Test.java @@ -25,18 +25,19 @@ import com.sun.star.uno.XComponentContext; import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; +import java.util.logging.Logger; +import java.util.logging.Level; import java.util.Map; public class Bootstrap_Test { + private static final Logger logger = Logger.getLogger(Bootstrap_Test.class.getName()); + static public boolean test( String ini_file, Map bootstrap_parameters ) throws java.lang.Exception { boolean passed = false; - System.err.println(); - System.out.println("*******************************************************************"); - System.err.println("Bootstrap - doing tests..."); - System.err.println(); + logger.log(Level.INFO, "Bootstrap - doing tests..."); try { XComponentContext xContext = @@ -54,14 +55,13 @@ public class Bootstrap_Test { XMultiServiceFactory msf = UnoRuntime.queryInterface( XMultiServiceFactory.class, xContext.getServiceManager() ); String services[] = msf.getAvailableServiceNames(); - System.out.println("Available services are:"); - System.err.println(); + logger.log(Level.FINE, "Available services are:"); if (services.length == 0) - System.out.println("No services avialable!"); + logger.log(Level.FINE, "No services avialable!"); else for ( int i=0; i