Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
21edfcb8
Kaydet (Commit)
21edfcb8
authored
Eyl 17, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
test case for ScRangeList
Change-Id: I371ac1b3236777a73e4f25f93d465041308e34b4
üst
4cf0759e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
213 additions
and
1 deletion
+213
-1
CppunitTest_sc_rangelst_test.mk
sc/CppunitTest_sc_rangelst_test.mk
+133
-0
Module_sc.mk
sc/Module_sc.mk
+1
-0
scdll.hxx
sc/inc/scdll.hxx
+3
-1
rangelst_test.cxx
sc/qa/unit/rangelst_test.cxx
+76
-0
No files found.
sc/CppunitTest_sc_rangelst_test.mk
0 → 100644
Dosyayı görüntüle @
21edfcb8
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License or as specified alternatively below. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# Major Contributor(s):
# Copyright (C) 2011 Red Hat, Inc., Caolán McNamara <caolanm@redhat.com>
# (initial developer)
#
# All Rights Reserved.
#
# For minor contributions see the git repository.
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_CppunitTest_CppunitTest,sc_rangelst_test))
$(eval $(call gb_CppunitTest_add_exception_objects,sc_rangelst_test, \
sc/qa/unit/rangelst_test \
))
$(eval $(call gb_CppunitTest_use_libraries,sc_rangelst_test, \
avmedia \
basegfx \
comphelper \
cppu \
cppuhelper \
drawinglayer \
editeng \
fileacc \
for \
forui \
i18nisolang1 \
msfilter \
oox \
sal \
salhelper \
sax \
sb \
sc \
sfx \
sot \
svl \
svt \
svx \
svxcore \
test \
tl \
tk \
ucbhelper \
unotest \
utl \
vbahelper \
vcl \
xo \
$(gb_STDLIBS) \
))
$(eval $(call gb_CppunitTest_set_include,sc_rangelst_test,\
-I$(SRCDIR)/sc/source/ui/inc \
-I$(SRCDIR)/sc/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_use_api,sc_rangelst_test,\
offapi \
oovbaapi \
udkapi \
))
$(eval $(call gb_CppunitTest_use_ure,sc_rangelst_test))
$(eval $(call gb_CppunitTest_use_components,sc_rangelst_test,\
basic/util/sb \
chart2/source/controller/chartcontroller \
chart2/source/chartcore \
comphelper/util/comphelp \
configmgr/source/configmgr \
dbaccess/util/dba \
embeddedobj/util/embobj \
eventattacher/source/evtatt \
fileaccess/source/fileacc \
filter/source/config/cache/filterconfig1 \
forms/util/frm \
framework/util/fwk \
i18npool/util/i18npool \
oox/util/oox \
package/source/xstor/xstor \
package/util/package2 \
sax/source/expatwrap/expwrap \
sax/source/fastparser/fastsax \
sc/util/sc \
sc/util/scd \
sc/util/scfilt \
sc/util/vbaobj \
scaddins/source/analysis/analysis \
scaddins/source/datefunc/date \
scripting/source/basprov/basprov \
scripting/util/scriptframe \
sfx2/util/sfx \
sot/util/sot \
svl/source/fsstor/fsstorage \
svl/util/svl \
svx/util/svx \
toolkit/util/tk \
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
ucb/source/ucp/tdoc/ucptdoc1 \
unotools/util/utl \
unoxml/source/rdf/unordf \
unoxml/source/service/unoxml \
xmloff/util/xo \
))
$(eval $(call gb_CppunitTest_use_configuration,sc_rangelst_test))
$(eval $(call gb_CppunitTest_use_filter_configuration,sc_rangelst_test))
$(eval $(call gb_CppunitTest_use_unittest_configuration,sc_rangelst_test))
# vim: set noet sw=4 ts=4:
sc/Module_sc.mk
Dosyayı görüntüle @
21edfcb8
...
...
@@ -44,6 +44,7 @@ endif
$(eval $(call gb_Module_add_check_targets,sc,\
CppunitTest_sc_ucalc \
CppunitTest_sc_filters_test \
CppunitTest_sc_rangelst_test \
))
$(eval $(call gb_Module_add_slowcheck_targets,sc,\
...
...
sc/inc/scdll.hxx
Dosyayı görüntüle @
21edfcb8
...
...
@@ -36,6 +36,8 @@ class SfxFilter;
#include <sfx2/module.hxx>
#include <sfx2/docfac.hxx>
#include "scdllapi.h"
/**
* This class is a wrapper for a Load-On-Demand-DLL. One instance per
* SfxApplication will be created for the runtime of
...
...
@@ -56,7 +58,7 @@ public:
static
void
PreExit
();
// muss vor LibExit gerufen werden
// DLL-init/exit-code must be linked to the DLL only
static
void
Init
();
// called directly after loading the DLL
static
SC_DLLPUBLIC
void
Init
();
// called directly after loading the DLL
static
sal_uLong
DetectFilter
(
SfxMedium
&
rMedium
,
const
SfxFilter
**
ppFilter
,
SfxFilterFlags
nMust
,
SfxFilterFlags
nDont
);
...
...
sc/qa/unit/rangelst_test.cxx
0 → 100644
Dosyayı görüntüle @
21edfcb8
/* -*- 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 <sal/config.h>
#include <test/bootstrapfixture.hxx>
#include "document.hxx"
#include "docsh.hxx"
#include "rangelst.hxx"
class
Test
:
public
test
::
BootstrapFixture
{
public
:
virtual
void
setUp
();
virtual
void
tearDown
();
void
testDeleteArea_4Ranges
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST
(
testDeleteArea_4Ranges
);
CPPUNIT_TEST_SUITE_END
();
private
:
ScDocument
*
m_pDoc
;
ScDocShellRef
m_xDocShRef
;
};
void
Test
::
setUp
()
{
BootstrapFixture
::
setUp
();
ScDLL
::
Init
();
m_xDocShRef
=
new
ScDocShell
(
SFXMODEL_STANDARD
|
SFXMODEL_DISABLE_EMBEDDED_SCRIPTS
|
SFXMODEL_DISABLE_DOCUMENT_RECOVERY
);
m_pDoc
=
m_xDocShRef
->
GetDocument
();
}
void
Test
::
tearDown
()
{
m_xDocShRef
.
Clear
();
BootstrapFixture
::
tearDown
();
}
void
Test
::
testDeleteArea_4Ranges
()
{
ScRangeList
aList
(
ScRange
(
0
,
0
,
0
,
5
,
5
,
0
));
aList
.
DeleteArea
(
2
,
2
,
0
,
3
,
3
,
0
);
CPPUNIT_ASSERT_EQUAL
(
aList
.
size
(),
static_cast
<
size_t
>
(
4
));
for
(
SCCOL
nCol
=
0
;
nCol
<=
5
;
++
nCol
)
{
for
(
SCROW
nRow
=
0
;
nRow
<=
5
;
++
nRow
)
{
if
((
nCol
==
2
||
nCol
==
3
)
&&
(
nRow
==
2
||
nRow
==
3
))
CPPUNIT_ASSERT
(
!
aList
.
Intersects
(
ScRange
(
nCol
,
nRow
,
0
)));
else
CPPUNIT_ASSERT
(
aList
.
Intersects
(
ScRange
(
nCol
,
nRow
,
0
)));
}
}
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment