diff --git a/dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk b/dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk deleted file mode 100644 index c9d0f0f2ea44..000000000000 --- a/dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk +++ /dev/null @@ -1,70 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -$(eval $(call gb_CppunitTest_CppunitTest,dbaccess_firebird_regression_test)) - -$(eval $(call gb_CppunitTest_use_external,dbaccess_firebird_regression_test,boost_headers)) - -$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_firebird_regression_test, \ - dbaccess/qa/unit/firebird-regression \ -)) - -$(eval $(call gb_CppunitTest_use_libraries,dbaccess_firebird_regression_test, \ - comphelper \ - cppu \ - dbaxml \ - firebird_sdbc \ - sal \ - subsequenttest \ - svt \ - test \ - unotest \ - utl \ - xo \ -)) - -$(eval $(call gb_CppunitTest_use_api,dbaccess_firebird_regression_test,\ - offapi \ - oovbaapi \ - udkapi \ -)) - -$(eval $(call gb_CppunitTest_use_ure,dbaccess_firebird_regression_test)) -$(eval $(call gb_CppunitTest_use_vcl,dbaccess_firebird_regression_test)) - -$(eval $(call gb_CppunitTest_use_components,dbaccess_firebird_regression_test,\ - basic/util/sb \ - comphelper/util/comphelp \ - configmgr/source/configmgr \ - connectivity/source/drivers/firebird/firebird_sdbc \ - connectivity/source/manager/sdbc2 \ - dbaccess/util/dba \ - dbaccess/source/filter/xml/dbaxml \ - dbaccess/util/dbu \ - filter/source/config/cache/filterconfig1 \ - framework/util/fwk \ - i18npool/util/i18npool \ - linguistic/source/lng \ - package/source/xstor/xstor \ - package/util/package2 \ - sax/source/expatwrap/expwrap \ - sfx2/util/sfx \ - svl/source/fsstor/fsstorage \ - svl/util/svl \ - toolkit/util/tk \ - ucb/source/core/ucb1 \ - ucb/source/ucp/file/ucpfile1 \ - unotools/util/utl \ - uui/util/uui \ - xmloff/util/xo \ -)) - -$(eval $(call gb_CppunitTest_use_configuration,dbaccess_firebird_regression_test)) - -# vim: set noet sw=4 ts=4: diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk index 49bd9d202c7f..2d2c9ae31c1b 100644 --- a/dbaccess/Module_dbaccess.mk +++ b/dbaccess/Module_dbaccess.mk @@ -42,12 +42,6 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\ $(if $(ENABLE_JAVA),CppunitTest_dbaccess_tdf126268) \ )) -# remove if we have a be file for this -ifeq ($(ENDIANNESS),little) -$(eval $(call gb_Module_add_check_targets,dbaccess,\ - CppunitTest_dbaccess_firebird_regression_test \ -)) -endif $(eval $(call gb_Module_add_check_targets,dbaccess,\ CppunitTest_dbaccess_firebird_test \ )) diff --git a/dbaccess/qa/unit/data/firebird_empty_le.odb b/dbaccess/qa/unit/data/firebird_empty_le.odb deleted file mode 100644 index 766c17db2ec9..000000000000 Binary files a/dbaccess/qa/unit/data/firebird_empty_le.odb and /dev/null differ diff --git a/dbaccess/qa/unit/data/firebird_integer_le_ods12.odb b/dbaccess/qa/unit/data/firebird_integer_le_ods12.odb deleted file mode 100644 index 95691ed20585..000000000000 Binary files a/dbaccess/qa/unit/data/firebird_integer_le_ods12.odb and /dev/null differ diff --git a/dbaccess/qa/unit/firebird-regression.cxx b/dbaccess/qa/unit/firebird-regression.cxx deleted file mode 100644 index d5c53b93a64d..000000000000 --- a/dbaccess/qa/unit/firebird-regression.cxx +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include "dbtest_base.cxx" - -#include -#include -#include -#include -#include -#include - -using namespace ::com::sun::star; -using namespace ::com::sun::star::sdb; -using namespace ::com::sun::star::sdbc; -using namespace ::com::sun::star::uno; - -class FirebirdTest - : public DBTestBase -{ -public: - void testEmptyDBConnection(); - void testIntegerDatabase(); - - CPPUNIT_TEST_SUITE(FirebirdTest); - CPPUNIT_TEST(testEmptyDBConnection); - CPPUNIT_TEST(testIntegerDatabase); - CPPUNIT_TEST_SUITE_END(); -}; - -/** - * Test the loading of an "empty" file, i.e. the embedded database has not yet - * been initialised (as occurs when a new .odb is created and opened by base). - */ -void FirebirdTest::testEmptyDBConnection() -{ -#ifdef OSL_BIGENDIAN - auto const tmp = createTempCopy("firebird_empty_be.odb"); -#else - auto const tmp = createTempCopy(u"firebird_empty_le.odb"); -#endif - uno::Reference< XOfficeDatabaseDocument > xDocument = - getDocumentForUrl(tmp.GetURL()); - - getConnectionForDocument(xDocument); - - closeDocument(uno::Reference(xDocument, uno::UNO_QUERY)); -} - -/** - * Test reading of integers from a known .odb to verify that the data - * can still be read on all systems. - */ -void FirebirdTest::testIntegerDatabase() -{ -#ifdef OSL_BIGENDIAN - uno::Reference< XOfficeDatabaseDocument > xDocument = - getDocumentForFileName("firebird_integer_be_ods12.odb"); -#else - uno::Reference< XOfficeDatabaseDocument > xDocument = - getDocumentForFileName(u"firebird_integer_le_ods12.odb"); -#endif - - uno::Reference< XConnection > xConnection = - getConnectionForDocument(xDocument); - - uno::Reference< XStatement > xStatement = xConnection->createStatement(); - CPPUNIT_ASSERT(xStatement.is()); - - uno::Reference< XResultSet > xResultSet = xStatement->executeQuery( - "SELECT * FROM TESTTABLE"); - CPPUNIT_ASSERT(xResultSet.is()); - CPPUNIT_ASSERT(xResultSet->next()); - - uno::Reference< XRow > xRow(xResultSet, UNO_QUERY); - CPPUNIT_ASSERT(xRow.is()); - uno::Reference< XColumnLocate > xColumnLocate(xRow, UNO_QUERY); - CPPUNIT_ASSERT(xColumnLocate.is()); - - CPPUNIT_ASSERT_EQUAL(sal_Int16(-30000), - xRow->getShort(xColumnLocate->findColumn("_SMALLINT"))); - CPPUNIT_ASSERT_EQUAL(sal_Int32(-2100000000), - xRow->getInt(xColumnLocate->findColumn("_INT"))); - CPPUNIT_ASSERT_EQUAL(SAL_CONST_INT64(-9000000000000000000), - xRow->getLong(xColumnLocate->findColumn("_BIGINT"))); - CPPUNIT_ASSERT_EQUAL(OUString("5"), - xRow->getString(xColumnLocate->findColumn("_CHAR"))); - CPPUNIT_ASSERT_EQUAL(OUString("5"), - xRow->getString(xColumnLocate->findColumn("_VARCHAR"))); - - CPPUNIT_ASSERT(!xResultSet->next()); // Should only be one row - - closeDocument(uno::Reference(xDocument, uno::UNO_QUERY)); -} - -CPPUNIT_TEST_SUITE_REGISTRATION(FirebirdTest); - -CPPUNIT_PLUGIN_IMPLEMENT(); - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */