svn commit: r1698208 - in /openoffice/trunk/main/codemaker: prj/build.lst test/cppumaker/makefile.mk test/cppumaker/test_codemaker_cppumaker.cxx test/javamaker/makefile.mk
Author: damjan Date: Thu Aug 27 18:44:50 2015 New Revision: 1698208 URL: http://svn.apache.org/r1698208 Log: #i125003# migrate main/codemaker from cppunit to Google Test. Run the cppumaker test on every build. Also some updates to the javamaker test (which doesn't work yet; JUnit version problem?). Modified: openoffice/trunk/main/codemaker/prj/build.lst openoffice/trunk/main/codemaker/test/cppumaker/makefile.mk openoffice/trunk/main/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx openoffice/trunk/main/codemaker/test/javamaker/makefile.mk Modified: openoffice/trunk/main/codemaker/prj/build.lst URL: http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/prj/build.lst?rev=1698208r1=1698207r2=1698208view=diff == --- openoffice/trunk/main/codemaker/prj/build.lst (original) +++ openoffice/trunk/main/codemaker/prj/build.lst Thu Aug 27 18:44:50 2015 @@ -7,5 +7,4 @@ cm codemaker\source\commoncpp nmake - cm codemaker\source\cppumaker nmake - all cm_cppumakercm_codemaker cm_cpp cm_inc NULL cm codemaker\source\commonjava nmake - all cm_java cm_inc NULL cm codemaker\source\javamaker nmake - all cm_javamaker cm_codemaker cm_java cm_inc NULL - - +cm codemaker\test\cppumakernmake - all cm_cppumaker_test cm_cppumaker cm_codemaker cm_cpp cm_inc NULL Modified: openoffice/trunk/main/codemaker/test/cppumaker/makefile.mk URL: http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/test/cppumaker/makefile.mk?rev=1698208r1=1698207r2=1698208view=diff == --- openoffice/trunk/main/codemaker/test/cppumaker/makefile.mk (original) +++ openoffice/trunk/main/codemaker/test/cppumaker/makefile.mk Thu Aug 27 18:44:50 2015 @@ -29,26 +29,27 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk -CFLAGSCXX += $(CPPUNIT_CFLAGS) +.IF $(ENABLE_UNIT_TESTS) != YES +all: + @echo unit tests are disabled. Nothing to do. -DLLPRE = # no leading lib on .so files +.ELSE INCPRE += $(MISC)$/$(TARGET)$/inc -SHL1TARGET = $(TARGET) -SHL1OBJS = $(SLO)$/test_codemaker_cppumaker.obj -SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB) -SHL1VERSIONMAP = version.map -SHL1IMPLIB = i$(SHL1TARGET) -DEF1NAME = $(SHL1TARGET) +APP1TARGET = $(TARGET) +APP1OBJS = $(SLO)$/test_codemaker_cppumaker.obj +APP1STDLIBS = $(CPPULIB) $(GTESTLIB) $(SALLIB) $(TESTSHL2LIB) +APP1VERSIONMAP = version.map +APP1IMPLIB = i$(APP1TARGET) +DEF1NAME = $(APP1TARGET) +APP1TEST = enabled -SLOFILES = $(SHL1OBJS) +SLOFILES = $(APP1OBJS) .INCLUDE: target.mk -ALLTAR: test - -$(SHL1OBJS): $(MISC)$/$(TARGET).cppumaker.flag +$(APP1OBJS): $(MISC)$/$(TARGET).cppumaker.flag $(MISC)$/$(TARGET).cppumaker.flag: $(BIN)$/cppumaker$(EXECPOST) $(MISC)$/$(TARGET).cppumaker.flag: $(MISC)$/$(TARGET).rdb @@ -65,5 +66,5 @@ $(MISC)$/$(TARGET)$/types.urd: types.idl - $(MKDIR) $(MISC)$/$(TARGET) $(IDLC) -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -cid -we $ -test .PHONY: $(SHL1TARGETN) -$(AUGMENT_LIBRARY_PATH) testshl2 $ + +.ENDIF # $(ENABLE_UNIT_TESTS) != YES Modified: openoffice/trunk/main/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx?rev=1698208r1=1698207r2=1698208view=diff == --- openoffice/trunk/main/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx (original) +++ openoffice/trunk/main/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx Thu Aug 27 18:44:50 2015 @@ -362,32 +362,17 @@ #include com/sun/star/uno/Any.hxx #include com/sun/star/uno/Type.hxx #include com/sun/star/uno/TypeClass.hpp -#include testshl/simpleheader.hxx #include rtl/ustring.h #include rtl/ustring.hxx +#include gtest/gtest.h #include cstddef #include iostream -namespace { +// FIXME: +#define RUN_OLD_FAILING_TESTS 0 -class Test: public CppUnit::TestFixture { -public: -void testBigStruct(); - -void testPolyStruct(); - -void testExceptions(); - -void testConstants(); - -CPPUNIT_TEST_SUITE(Test); -CPPUNIT_TEST(testBigStruct); -CPPUNIT_TEST(testPolyStruct); -CPPUNIT_TEST(testExceptions); -CPPUNIT_TEST(testConstants); -CPPUNIT_TEST_SUITE_END(); -}; +namespace { struct Guard { explicit Guard(void * buffer): @@ -398,7 +383,7 @@ struct Guard { test::codemaker::cppumaker::BigStruct * const p; }; -void Test::testBigStruct() { +TEST(Test, testBigStruct) { // Default-initialize a BigStruct instance on top of a memory buffer filled // with random data, and make sure that all members are default-initialized:
buildbot success in ASF Buildbot on openoffice-linux64-rat-aoo410
The Buildbot has detected a passing build on builder openoffice-linux64-rat-aoo410 while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-linux64-rat-aoo410/builds/47 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: tethys_ubuntu Build Reason: The Nightly scheduler named 'openoffice-linux64-rat-aoo410' triggered this build Build Source Stamp: [branch openoffice/branches/AOO410] HEAD Blamelist: Build succeeded! Sincerely, -The Buildbot
buildbot exception in ASF Buildbot on aoo-win7
The Buildbot has detected a build exception on builder aoo-win7 while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/aoo-win7/builds/65 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-win7 Build Reason: The Nightly scheduler named 'aoo-win7-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: BUILD FAILED: exception svn info autoconf configure bootstrap build.pl --all copy log index upload logs Sincerely, -The Buildbot
buildbot success in ASF Buildbot on openoffice-linux32-nightly
The Buildbot has detected a passing build on builder openoffice-linux32-nightly while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-linux32-nightly/builds/67 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm2_ubuntu_32bit Build Reason: The Nightly scheduler named 'openoffice-linux32-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: Build succeeded! Sincerely, -The Buildbot
buildbot failure in ASF Buildbot on openoffice-linux64-nightly
The Buildbot has detected a failed build on builder openoffice-linux64-nightly while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-linux64-nightly/builds/62 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: tethys_ubuntu Build Reason: The Nightly scheduler named 'openoffice-linux64-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: BUILD FAILED: failed Sincerely, -The Buildbot
svn commit: r1698257 [2/2] - in /openoffice/trunk/main/basegfx/test: basegfx1d.cxx basegfx2d.cxx basegfx3d.cxx basegfxtools.cxx boxclipper.cxx clipstate.cxx genericclipper.cxx main.cxx makefile.mk
Modified: openoffice/trunk/main/basegfx/test/basegfxtools.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basegfx/test/basegfxtools.cxx?rev=1698257r1=1698256r2=1698257view=diff == --- openoffice/trunk/main/basegfx/test/basegfxtools.cxx (original) +++ openoffice/trunk/main/basegfx/test/basegfxtools.cxx Fri Aug 28 03:58:57 2015 @@ -27,9 +27,7 @@ // autogenerated file with codegen.pl #include preextstl.h -#include cppunit/TestAssert.h -#include cppunit/TestFixture.h -#include cppunit/extensions/HelperMacros.h +#include gtest/gtest.h #include postextstl.h #include basegfx/tools/keystoplerp.hxx @@ -43,8 +41,9 @@ using namespace ::boost::tuples; namespace basegfxtools { -class KeyStopLerpTest : public CppUnit::TestFixture +class KeyStopLerpTest : public ::testing::Test { +protected: tools::KeyStopLerp maKeyStops; static std::vectordouble getTestVector() @@ -61,48 +60,40 @@ public: maKeyStops(getTestVector()) {} -void setUp() +virtual void SetUp() {} -void tearDown() +virtual void TearDown() {} +}; -void test() -{ -double fAlpha; -std::ptrdiff_t nIndex; +TEST_F(KeyStopLerpTest, test) +{ +double fAlpha; +std::ptrdiff_t nIndex; -tie(nIndex,fAlpha) = maKeyStops.lerp(-1.0); -CPPUNIT_ASSERT_MESSAGE(-1.0, nIndex==0 fAlpha==0.0); +tie(nIndex,fAlpha) = maKeyStops.lerp(-1.0); +ASSERT_TRUE(nIndex==0 fAlpha==0.0) -1.0; -tie(nIndex,fAlpha) = maKeyStops.lerp(0.1); -CPPUNIT_ASSERT_MESSAGE(0.1, nIndex==0 fAlpha==0.0); +tie(nIndex,fAlpha) = maKeyStops.lerp(0.1); +ASSERT_TRUE(nIndex==0 fAlpha==0.0) 0.1; -tie(nIndex,fAlpha) = maKeyStops.lerp(0.3); -CPPUNIT_ASSERT_MESSAGE(0.3, nIndex==0 fTools::equal(fAlpha,0.5)); +tie(nIndex,fAlpha) = maKeyStops.lerp(0.3); +ASSERT_TRUE(nIndex==0 fTools::equal(fAlpha,0.5)) 0.3; -tie(nIndex,fAlpha) = maKeyStops.lerp(0.5); -CPPUNIT_ASSERT_MESSAGE(0.5, nIndex==0 fTools::equal(fAlpha,1.0)); +tie(nIndex,fAlpha) = maKeyStops.lerp(0.5); +ASSERT_TRUE(nIndex==0 fTools::equal(fAlpha,1.0)) 0.5; -tie(nIndex,fAlpha) = maKeyStops.lerp(0.51); -CPPUNIT_ASSERT_MESSAGE(0.51, nIndex==1 fTools::equal(fAlpha,0.025)); +tie(nIndex,fAlpha) = maKeyStops.lerp(0.51); +ASSERT_TRUE(nIndex==1 fTools::equal(fAlpha,0.025)) 0.51; -tie(nIndex,fAlpha) = maKeyStops.lerp(0.9); -CPPUNIT_ASSERT_MESSAGE(0.51, nIndex==1 fTools::equal(fAlpha,1.0)); +tie(nIndex,fAlpha) = maKeyStops.lerp(0.9); +ASSERT_TRUE(nIndex==1 fTools::equal(fAlpha,1.0)) 0.51; -tie(nIndex,fAlpha) = maKeyStops.lerp(1.0); -CPPUNIT_ASSERT_MESSAGE(0.51, nIndex==1 fAlpha==1.0); -} - -// Change the following lines only, if you add, remove or rename -// member functions of the current class, -// because these macros are need by auto register mechanism. - -CPPUNIT_TEST_SUITE(KeyStopLerpTest); -CPPUNIT_TEST(test); -CPPUNIT_TEST_SUITE_END(); -}; +tie(nIndex,fAlpha) = maKeyStops.lerp(1.0); +ASSERT_TRUE(nIndex==1 fAlpha==1.0) 0.51; +} // - -CPPUNIT_TEST_SUITE_REGISTRATION(basegfxtools::KeyStopLerpTest); + } // namespace basegfxtools Modified: openoffice/trunk/main/basegfx/test/boxclipper.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basegfx/test/boxclipper.cxx?rev=1698257r1=1698256r2=1698257view=diff == --- openoffice/trunk/main/basegfx/test/boxclipper.cxx (original) +++ openoffice/trunk/main/basegfx/test/boxclipper.cxx Fri Aug 28 03:58:57 2015 @@ -27,9 +27,7 @@ // autogenerated file with codegen.pl #include preextstl.h -#include cppunit/TestAssert.h -#include cppunit/TestFixture.h -#include cppunit/extensions/HelperMacros.h +#include gtest/gtest.h #include postextstl.h #include basegfx/matrix/b2dhommatrix.hxx @@ -48,6 +46,8 @@ using namespace ::basegfx; +// FIXME: +#define RUN_OLD_FAILING_TESTS 0 namespace basegfx2d { @@ -67,9 +67,9 @@ inline bool compare(const B2DPoint left } -class boxclipper : public CppUnit::TestFixture +class boxclipper : public ::testing::Test { -private: +protected: B2DPolyRange aDisjunctRanges; B2DPolyRange aEqualRanges; B2DPolyRange aIntersectionN; @@ -88,7 +88,7 @@ private: public: // initialise your test code values here. -void setUp() +virtual void SetUp() { B2DRange aCenter(100, 100, -100, -100); B2DRange aOffside(800, 800, 1000, 1000); @@ -189,7 +189,7 @@ public: #endif } -void tearDown() +virtual void TearDown() { } @@ -241,57 +241,16 @@ public: void verifyPoly(const char* sName, const char* sSvg, const B2DPolyRange toTest) {
svn commit: r1698257 [1/2] - in /openoffice/trunk/main/basegfx/test: basegfx1d.cxx basegfx2d.cxx basegfx3d.cxx basegfxtools.cxx boxclipper.cxx clipstate.cxx genericclipper.cxx main.cxx makefile.mk
Author: damjan Date: Fri Aug 28 03:58:57 2015 New Revision: 1698257 URL: http://svn.apache.org/r1698257 Log: #i125003# migrate main/basegfx from cppunit to Google Test. Added: openoffice/trunk/main/basegfx/test/main.cxx Modified: openoffice/trunk/main/basegfx/test/basegfx1d.cxx openoffice/trunk/main/basegfx/test/basegfx2d.cxx openoffice/trunk/main/basegfx/test/basegfx3d.cxx openoffice/trunk/main/basegfx/test/basegfxtools.cxx openoffice/trunk/main/basegfx/test/boxclipper.cxx openoffice/trunk/main/basegfx/test/clipstate.cxx openoffice/trunk/main/basegfx/test/genericclipper.cxx openoffice/trunk/main/basegfx/test/makefile.mk Modified: openoffice/trunk/main/basegfx/test/basegfx1d.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basegfx/test/basegfx1d.cxx?rev=1698257r1=1698256r2=1698257view=diff == --- openoffice/trunk/main/basegfx/test/basegfx1d.cxx (original) +++ openoffice/trunk/main/basegfx/test/basegfx1d.cxx Fri Aug 28 03:58:57 2015 @@ -27,45 +27,23 @@ // autogenerated file with codegen.pl #include preextstl.h -#include cppunit/TestAssert.h -#include cppunit/TestFixture.h -#include cppunit/extensions/HelperMacros.h -#include cppunit/plugin/TestPlugIn.h +#include gtest/gtest.h #include postextstl.h namespace basegfx1d { -class b1drange : public CppUnit::TestFixture +class b1drange : public ::testing::Test { public: // initialise your test code values here. -void setUp() +virtual void SetUp() { } -void tearDown() +virtual void TearDown() { } - -// insert your test code here. -// this is only demonstration code -void EmptyMethod() -{ - // CPPUNIT_ASSERT_MESSAGE(a message, 1 == 1); -} - -// Change the following lines only, if you add, remove or rename -// member functions of the current class, -// because these macros are need by auto register mechanism. - -CPPUNIT_TEST_SUITE(b1drange); -CPPUNIT_TEST(EmptyMethod); -CPPUNIT_TEST_SUITE_END(); }; // class b1drange -// - -CPPUNIT_TEST_SUITE_REGISTRATION(basegfx1d::b1drange); } // namespace basegfx1d - -CPPUNIT_PLUGIN_IMPLEMENT(); Modified: openoffice/trunk/main/basegfx/test/basegfx2d.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basegfx/test/basegfx2d.cxx?rev=1698257r1=1698256r2=1698257view=diff == --- openoffice/trunk/main/basegfx/test/basegfx2d.cxx (original) +++ openoffice/trunk/main/basegfx/test/basegfx2d.cxx Fri Aug 28 03:58:57 2015 @@ -27,9 +27,7 @@ // autogenerated file with codegen.pl #include preextstl.h -#include cppunit/TestAssert.h -#include cppunit/TestFixture.h -#include cppunit/extensions/HelperMacros.h +#include gtest/gtest.h #include postextstl.h #include basegfx/matrix/b2dhommatrix.hxx @@ -56,9 +54,9 @@ using namespace ::basegfx; namespace basegfx2d { -class b2dsvgdimpex : public CppUnit::TestFixture +class b2dsvgdimpex : public ::testing::Test { -private: +protected: ::rtl::OUString aPath0; ::rtl::OUString aPath1; ::rtl::OUString aPath2; @@ -66,7 +64,7 @@ private: public: // initialise your test code values here. -void setUp() +virtual void SetUp() { // simple rectangle aPath0 = ::rtl::OUString::createFromAscii( @@ -140,179 +138,147 @@ public: 31-24 33-22 34-20 35-18 36-16 37-15 39-12 40-11z ); } -void tearDown() +virtual void TearDown() { } +}; // class b2dsvgdimpex -void impex() -{ -B2DPolyPolygon aPoly; -::rtl::OUString aExport; - -CPPUNIT_ASSERT_MESSAGE(importing simple rectangle from SVG-D, - tools::importFromSvgD( aPoly, aPath0, false, 0 )); -aExport = tools::exportToSvgD( aPoly, true, true, false ); -const char* sExportString = m10 10h-20v-20h20z; -CPPUNIT_ASSERT_MESSAGE(exporting rectangle to SVG-D, - !aExport.compareToAscii(sExportString) ); -CPPUNIT_ASSERT_MESSAGE(importing simple rectangle from SVG-D (round-trip, - tools::importFromSvgD( aPoly, aExport, false, 0 )); -aExport = tools::exportToSvgD( aPoly, true, true, false ); -CPPUNIT_ASSERT_MESSAGE(exporting rectangle to SVG-D (round-trip), - !aExport.compareToAscii(sExportString)); - -CPPUNIT_ASSERT_MESSAGE(importing simple bezier polygon from SVG-D, - tools::importFromSvgD( aPoly, aPath1, false, 0 )); -aExport = tools::exportToSvgD( aPoly, true, true, false ); - - // Adaptions for B2DPolygon bezier change (see #i77162#): - // - // The import/export of aPath1 does not reproduce
svn commit: r1698258 - in /openoffice/trunk/main/basegfx/test: export.map makefile.mk
Author: damjan Date: Fri Aug 28 04:03:15 2015 New Revision: 1698258 URL: http://svn.apache.org/r1698258 Log: No need for version map file with Google Test. Removed: openoffice/trunk/main/basegfx/test/export.map Modified: openoffice/trunk/main/basegfx/test/makefile.mk Modified: openoffice/trunk/main/basegfx/test/makefile.mk URL: http://svn.apache.org/viewvc/openoffice/trunk/main/basegfx/test/makefile.mk?rev=1698258r1=1698257r2=1698258view=diff == --- openoffice/trunk/main/basegfx/test/makefile.mk (original) +++ openoffice/trunk/main/basegfx/test/makefile.mk Fri Aug 28 04:03:15 2015 @@ -64,7 +64,6 @@ APP1STDLIBS= \ APP1IMPLIB= i$(APP1TARGET) APP1RPATH = NONE DEF1NAME=$(APP1TARGET) -APP1VERSIONMAP = export.map APP1TEST = enabled # END --
buildbot failure in ASF Buildbot on openoffice-fbsd-nightly
The Buildbot has detected a failed build on builder openoffice-fbsd-nightly while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-fbsd-nightly/builds/50 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-fbsd2_64bit Build Reason: The Nightly scheduler named 'openoffice-fbsd-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: BUILD FAILED: failed configure bootstrap Sincerely, -The Buildbot
buildbot success in ASF Buildbot on openoffice-linux64-rat
The Buildbot has detected a passing build on builder openoffice-linux64-rat while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-linux64-rat/builds/51 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: tethys_ubuntu Build Reason: The Nightly scheduler named 'openoffice-linux64-rat' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: Build succeeded! Sincerely, -The Buildbot
buildbot success in ASF Buildbot on openoffice-linux64-nightly
The Buildbot has detected a passing build on builder openoffice-linux64-nightly while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/openoffice-linux64-nightly/builds/61 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: tethys_ubuntu Build Reason: The Nightly scheduler named 'openoffice-linux64-nightly' triggered this build Build Source Stamp: [branch openoffice/trunk] HEAD Blamelist: Build succeeded! Sincerely, -The Buildbot