You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2015/09/03 19:13:34 UTC

svn commit: r1701080 - in /openoffice/trunk/main/sal/qa/osl/profile: makefile.mk osl_old_testprofile.cxx

Author: damjan
Date: Thu Sep  3 17:13:34 2015
New Revision: 1701080

URL: http://svn.apache.org/r1701080
Log:
#i125003# migrate main/sal/qa/osl/profile from cppunit to Google Test.


Modified:
    openoffice/trunk/main/sal/qa/osl/profile/makefile.mk
    openoffice/trunk/main/sal/qa/osl/profile/osl_old_testprofile.cxx

Modified: openoffice/trunk/main/sal/qa/osl/profile/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/qa/osl/profile/makefile.mk?rev=1701080&r1=1701079&r2=1701080&view=diff
==============================================================================
--- openoffice/trunk/main/sal/qa/osl/profile/makefile.mk (original)
+++ openoffice/trunk/main/sal/qa/osl/profile/makefile.mk Thu Sep  3 17:13:34 2015
@@ -36,33 +36,29 @@ ENABLE_EXCEPTIONS=TRUE
 
 .INCLUDE :  settings.mk
 
+.IF "$(ENABLE_UNIT_TESTS)" != "YES"
+all:
+	@echo unit tests are disabled. Nothing to do.
+
+.ELSE
+
 CFLAGS+= $(LFS_CFLAGS)
 CXXFLAGS+= $(LFS_CFLAGS)
 
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
 # BEGIN ----------------------------------------------------------------
-SHL1OBJS=  \
+APP1OBJS=  \
 	$(SLO)$/osl_old_testprofile.obj
 
-SHL1TARGET= osl_old_testprofile
-SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB)
-
-SHL1IMPLIB= i$(SHL1TARGET)
-DEF1NAME    =$(SHL1TARGET)
-SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
-SHL1RPATH = NONE
+APP1TARGET= osl_old_testprofile
+APP1STDLIBS= $(SALLIB) $(GTESTLIB)
+APP1RPATH = NONE
+APP1TEST = enabled
 # END ------------------------------------------------------------------
 
-
-#------------------------------- All object files -------------------------------
-# do this here, so we get right dependencies
-SLOFILES=\
-	$(SHL1OBJS)
-
 # --- Targets ------------------------------------------------------
 
 .INCLUDE :  target.mk
-.INCLUDE : _cppunit.mk
+
+.ENDIF # "$(ENABLE_UNIT_TESTS)" != "YES"
 
 .END

Modified: openoffice/trunk/main/sal/qa/osl/profile/osl_old_testprofile.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sal/qa/osl/profile/osl_old_testprofile.cxx?rev=1701080&r1=1701079&r2=1701080&view=diff
==============================================================================
--- openoffice/trunk/main/sal/qa/osl/profile/osl_old_testprofile.cxx (original)
+++ openoffice/trunk/main/sal/qa/osl/profile/osl_old_testprofile.cxx Thu Sep  3 17:13:34 2015
@@ -33,26 +33,18 @@
 #include <stdio.h>
 #include <osl/profile.h>
 
-#include "cppunit/TestAssert.h"
-#include "cppunit/TestFixture.h"
-#include "cppunit/extensions/HelperMacros.h"
-#include "cppunit/plugin/TestPlugIn.h"
+#include "gtest/gtest.h"
 
 //==================================================================================================
 // -----------------------------------------------------------------------------
 namespace osl_Profile
 {
-    class oldtests : public CppUnit::TestFixture
+    class oldtests : public ::testing::Test
     {
     public:
-        void test_profile();
-
-        CPPUNIT_TEST_SUITE( oldtests );
-        CPPUNIT_TEST( test_profile );
-        CPPUNIT_TEST_SUITE_END( );
     };
 
-void oldtests::test_profile(void)
+TEST_F(oldtests, test_profile)
 {
 	oslProfile hProfile;
     rtl_uString* ustrProfileName=0;
@@ -88,8 +80,8 @@ void oldtests::test_profile(void)
 
 } // namespace osl_Profile
 
-// -----------------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_REGISTRATION( osl_Profile::oldtests );
-
-// -----------------------------------------------------------------------------
-CPPUNIT_PLUGIN_IMPLEMENT();
+int main(int argc, char **argv)
+{
+    ::testing::InitGoogleTest(&argc, argv);
+    return RUN_ALL_TESTS();
+}