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
28a5d4b5
Kaydet (Commit)
28a5d4b5
authored
Eki 13, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CppunitTest_sd_tiledrendering: CALLBACK_SEARCH_RESULT_SELECTION testcase
Change-Id: I8a2fcaad5806ef204cdac0f6eaac615d50d6d9e8
üst
395cfab0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
tiledrendering.cxx
sd/qa/unit/tiledrendering/tiledrendering.cxx
+17
-3
No files found.
sd/qa/unit/tiledrendering/tiledrendering.cxx
Dosyayı görüntüle @
28a5d4b5
...
...
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <test/xmltesttools.hxx>
#include <boost/property_tree/json_parser.hpp>
#define LOK_USE_UNSTABLE_API
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <com/sun/star/frame/Desktop.hpp>
...
...
@@ -19,9 +23,6 @@
#include <editeng/outliner.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <test/bootstrapfixture.hxx>
#include <test/xmltesttools.hxx>
#include <unotest/macros_test.hxx>
#include <DrawDocShell.hxx>
#include <ViewShell.hxx>
...
...
@@ -78,6 +79,7 @@ private:
std
::
vector
<
Rectangle
>
m_aSelection
;
bool
m_bFound
;
sal_Int32
m_nPart
;
std
::
vector
<
OString
>
m_aSearchResultSelection
;
#endif
};
...
...
@@ -182,6 +184,16 @@ void SdTiledRenderingTest::callbackImpl(int nType, const char* pPayload)
m_nPart
=
aPayload
.
toInt32
();
}
break
;
case
LOK_CALLBACK_SEARCH_RESULT_SELECTION
:
{
m_aSearchResultSelection
.
clear
();
boost
::
property_tree
::
ptree
aTree
;
std
::
stringstream
aStream
(
pPayload
);
boost
::
property_tree
::
read_json
(
aStream
,
aTree
);
for
(
boost
::
property_tree
::
ptree
::
value_type
&
rValue
:
aTree
.
get_child
(
"searchResultSelection"
))
m_aSearchResultSelection
.
push_back
(
rValue
.
second
.
data
().
c_str
());
}
break
;
}
}
...
...
@@ -387,6 +399,8 @@ void SdTiledRenderingTest::testSearch()
lcl_search
(
"bbb"
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_Int32
>
(
1
),
m_nPart
);
CPPUNIT_ASSERT_EQUAL
(
true
,
m_bFound
);
// This was 0; should be 1 match for "find".
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
size_t
>
(
1
),
m_aSearchResultSelection
.
size
());
// This should trigger the not-found callback.
lcl_search
(
"ccc"
);
...
...
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