Kaydet (Commit) e59b5919 authored tarafından Damjan Jovanovic's avatar Damjan Jovanovic

#i125003# migrate main/sal/qa/osl/profile from cppunit to Google Test.

üst 38ee8ff7
...@@ -36,33 +36,29 @@ ENABLE_EXCEPTIONS=TRUE ...@@ -36,33 +36,29 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk .INCLUDE : settings.mk
.IF "$(ENABLE_UNIT_TESTS)" != "YES"
all:
@echo unit tests are disabled. Nothing to do.
.ELSE
CFLAGS+= $(LFS_CFLAGS) CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS)
CFLAGSCXX += $(CPPUNIT_CFLAGS)
# BEGIN ---------------------------------------------------------------- # BEGIN ----------------------------------------------------------------
SHL1OBJS= \ APP1OBJS= \
$(SLO)$/osl_old_testprofile.obj $(SLO)$/osl_old_testprofile.obj
SHL1TARGET= osl_old_testprofile APP1TARGET= osl_old_testprofile
SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) APP1STDLIBS= $(SALLIB) $(GTESTLIB)
APP1RPATH = NONE
SHL1IMPLIB= i$(SHL1TARGET) APP1TEST = enabled
DEF1NAME =$(SHL1TARGET)
SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
SHL1RPATH = NONE
# END ------------------------------------------------------------------ # END ------------------------------------------------------------------
#------------------------------- All object files -------------------------------
# do this here, so we get right dependencies
SLOFILES=\
$(SHL1OBJS)
# --- Targets ------------------------------------------------------ # --- Targets ------------------------------------------------------
.INCLUDE : target.mk .INCLUDE : target.mk
.INCLUDE : _cppunit.mk
.ENDIF # "$(ENABLE_UNIT_TESTS)" != "YES"
.END .END
...@@ -33,26 +33,18 @@ ...@@ -33,26 +33,18 @@
#include <stdio.h> #include <stdio.h>
#include <osl/profile.h> #include <osl/profile.h>
#include "cppunit/TestAssert.h" #include "gtest/gtest.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
//================================================================================================== //==================================================================================================
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
namespace osl_Profile namespace osl_Profile
{ {
class oldtests : public CppUnit::TestFixture class oldtests : public ::testing::Test
{ {
public: 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; oslProfile hProfile;
rtl_uString* ustrProfileName=0; rtl_uString* ustrProfileName=0;
...@@ -88,8 +80,8 @@ void oldtests::test_profile(void) ...@@ -88,8 +80,8 @@ void oldtests::test_profile(void)
} // namespace osl_Profile } // namespace osl_Profile
// ----------------------------------------------------------------------------- int main(int argc, char **argv)
CPPUNIT_TEST_SUITE_REGISTRATION( osl_Profile::oldtests ); {
::testing::InitGoogleTest(&argc, argv);
// ----------------------------------------------------------------------------- return RUN_ALL_TESTS();
CPPUNIT_PLUGIN_IMPLEMENT(); }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment