[Libreoffice-commits] core.git: sc/qa
Jens Carl
j.carl43 at gmx.de
Wed Jan 31 18:14:13 UTC 2018
sc/qa/extras/sctableconditionalentryobj.cxx | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
New commits:
commit ad39f63d4d46abed6786f9b2337d07b3ab443efb
Author: Jens Carl <j.carl43 at gmx.de>
Date: Tue Jan 30 21:48:26 2018 +0000
Remove shared mxComponent (test document) in sctableconditionalentryobj
Change-Id: Id95c3d528ac3f50653c69778ca0b497662669f8e
Reviewed-on: https://gerrit.libreoffice.org/48938
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jens Carl <j.carl43 at gmx.de>
diff --git a/sc/qa/extras/sctableconditionalentryobj.cxx b/sc/qa/extras/sctableconditionalentryobj.cxx
index ad39a74ef20e..bec1a3dde562 100644
--- a/sc/qa/extras/sctableconditionalentryobj.cxx
+++ b/sc/qa/extras/sctableconditionalentryobj.cxx
@@ -35,8 +35,6 @@ using namespace com::sun::star;
namespace sc_apitest
{
-#define NUMBER_OF_TESTS 5
-
class ScTableConditionalEntryObj : public CalcUnoApiTest,
public apitest::XSheetConditionalEntry,
public apitest::XSheetCondition
@@ -62,13 +60,9 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- static sal_Int32 nTest;
- static uno::Reference<lang::XComponent> mxComponent;
+ uno::Reference<lang::XComponent> mxComponent;
};
-sal_Int32 ScTableConditionalEntryObj::nTest = 0;
-uno::Reference<lang::XComponent> ScTableConditionalEntryObj::mxComponent;
-
ScTableConditionalEntryObj::ScTableConditionalEntryObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
{
@@ -76,10 +70,6 @@ ScTableConditionalEntryObj::ScTableConditionalEntryObj()
uno::Reference<uno::XInterface> ScTableConditionalEntryObj::init()
{
- // create a calc document
- if (!mxComponent.is())
- mxComponent = loadFromDesktop("private:factory/scalc");
-
uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
@@ -115,19 +105,14 @@ uno::Reference<uno::XInterface> ScTableConditionalEntryObj::init()
void ScTableConditionalEntryObj::setUp()
{
- nTest++;
- CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
CalcUnoApiTest::setUp();
+ // create a calc document
+ mxComponent = loadFromDesktop("private:factory/scalc");
}
void ScTableConditionalEntryObj::tearDown()
{
- if (nTest == NUMBER_OF_TESTS)
- {
- closeDocument(mxComponent);
- mxComponent.clear();
- }
-
+ closeDocument(mxComponent);
CalcUnoApiTest::tearDown();
}
More information about the Libreoffice-commits
mailing list