diff options
author | Damjan Jovanovic <damjan@apache.org> | 2015-09-03 17:13:34 +0000 |
---|---|---|
committer | Damjan Jovanovic <damjan@apache.org> | 2015-09-03 17:13:34 +0000 |
commit | e59b59198d29e687c39b1ba2148d6ea37910613f (patch) | |
tree | e4eaba513517fb89af330a0cc9bb40b62aeebcdc /sal/qa | |
parent | 38ee8ff75aa5b6f1527493baa41569a1377a7cc3 (diff) |
#i125003# migrate main/sal/qa/osl/profile from cppunit to Google Test.
Notes
Notes:
ignore: googletest
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/osl/profile/makefile.mk | 30 | ||||
-rw-r--r-- | sal/qa/osl/profile/osl_old_testprofile.cxx | 24 |
2 files changed, 21 insertions, 33 deletions
diff --git a/sal/qa/osl/profile/makefile.mk b/sal/qa/osl/profile/makefile.mk index a6c5b769f24b..34f2cec7f6c4 100644 --- a/sal/qa/osl/profile/makefile.mk +++ b/sal/qa/osl/profile/makefile.mk @@ -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 diff --git a/sal/qa/osl/profile/osl_old_testprofile.cxx b/sal/qa/osl/profile/osl_old_testprofile.cxx index c307107cd979..cc9f494bdd8f 100644 --- a/sal/qa/osl/profile/osl_old_testprofile.cxx +++ b/sal/qa/osl/profile/osl_old_testprofile.cxx @@ -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(); +} |