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
.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
......@@ -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();
}
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