sw/CppunitTest_sw_apitests.mk      |    2 ++
 sw/qa/api/SwXAutoTextContainer.cxx |    6 +-----
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 78a3448f056fd4863c12fdba5d911e05a1540568
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Mon Aug 28 13:21:04 2023 +0200
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Mon Aug 28 16:48:24 2023 +0200

    Fix CppunitTest_sw_apitests
    
    For one, a dependency was missing to avoid
    
    > [_RUN_____] (anonymous namespace)::SwXAutoTextContainer::testGetByName
    > standard
    > test/source/container/xnameaccess.cxx:30:(anonymous 
namespace)::SwXAutoTextContainer::testGetByName
    > unexpected exception caught
    > - Caught: unknown.
    >
    > (anonymous namespace)::SwXAutoTextContainer::testGetByName finished in: 
147ms
    > [_RUN_____] (anonymous 
namespace)::SwXAutoTextContainer::testGetElementNames
    > standard
    > (anonymous namespace)::SwXAutoTextContainer::testGetElementNames finished 
in: 0ms
    > [_RUN_____] (anonymous namespace)::SwXAutoTextContainer::testHasByName
    > standard
    > test/source/container/xnameaccess.cxx:48:(anonymous 
namespace)::SwXAutoTextContainer::testHasByName
    > assertion failed
    > - Expression: xNA->hasByName(m_aName)
    >
    > (anonymous namespace)::SwXAutoTextContainer::testHasByName finished in: 
0ms
    > [_RUN_____] (anonymous namespace)::SwXAutoTextContainer::testGetCount
    > standard
    > test/source/container/xindexaccess.cxx:26:(anonymous 
namespace)::SwXAutoTextContainer::testGetCount
    > equality assertion failed
    > - Expected: 3
    > - Actual  : 1
    >
    > (anonymous namespace)::SwXAutoTextContainer::testGetCount finished in: 0ms
    > [_RUN_____] (anonymous namespace)::SwXAutoTextContainer::testGetByIndex
    > standard
    > test/source/container/xindexaccess.cxx:32:(anonymous 
namespace)::SwXAutoTextContainer::testGetByIndex
    > equality assertion failed
    > - Expected: 3
    > - Actual  : 1
    >
    > (anonymous namespace)::SwXAutoTextContainer::testGetByIndex finished in: 
0ms
    
    And for another, executing the XAutoTextContainer test code in
    SwXAutoTextContainer corrupted instdir/,  testInsertNewByName creating a
    spurious instdir/share/autotext/en-US/crdbus50Insert.bau, and 
testRemoveByName
    removing instdir/share/autotext/en-US/crdbus50.bau, which caused subsequent 
runs
    of the CppunitTest to fail with
    
    > [_RUN_____] (anonymous namespace)::SwXAutoTextContainer::testGetCount
    > standard
    > 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/test/source/container/xindexaccess.cxx:26:(anonymous
 namespace)::SwXAutoTextContainer::testGetCount
    > equality assertion failed
    > - Expected: 3
    > - Actual  : 4
    >
    > (anonymous namespace)::SwXAutoTextContainer::testGetCount finished in: 0ms
    > [_RUN_____] (anonymous namespace)::SwXAutoTextContainer::testGetByIndex
    > standard
    > 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/test/source/container/xindexaccess.cxx:32:(anonymous
 namespace)::SwXAutoTextContainer::testGetByIndex
    > equality assertion failed
    > - Expected: 3
    > - Actual  : 4
    >
    > (anonymous namespace)::SwXAutoTextContainer::testGetByIndex finished in: 
0ms
    
    (<https://ci.libreoffice.org//job/lo_tb_master_linux_dbg/44666/>).  So this
    commit reverts that part of 7b999ca22824e102d283a8b7327fa2717db6568a 
"tdf#45904:
    Move _XAutoTextContainer Java tests to C++" for now.
    
    Change-Id: I46387d3fea21706846f2c1ba4c462402f9343fdc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156192
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 76c79757e660..04192c78b0c9 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -106,4 +106,6 @@ $(eval $(call gb_CppunitTest_use_uiconfigs,sw_apitests, \
     svx \
 ))
 
+$(call gb_CppunitTest_get_target,sw_apitests): $(call 
gb_AllLangPackage_get_target,autotextshare)
+
 # vim: set noet sw=4 ts=4:
diff --git a/sw/qa/api/SwXAutoTextContainer.cxx 
b/sw/qa/api/SwXAutoTextContainer.cxx
index f848846324e0..1f1fc3df1d49 100644
--- a/sw/qa/api/SwXAutoTextContainer.cxx
+++ b/sw/qa/api/SwXAutoTextContainer.cxx
@@ -31,8 +31,7 @@ namespace
 class SwXAutoTextContainer final : public UnoApiTest,
                                    public apitest::XElementAccess,
                                    public apitest::XIndexAccess,
-                                   public apitest::XNameAccess,
-                                   public apitest::XAutoTextContainer
+                                   public apitest::XNameAccess
 {
 public:
     SwXAutoTextContainer()
@@ -40,7 +39,6 @@ public:
         , XElementAccess(cppu::UnoType<text::XAutoTextGroup>::get())
         , XIndexAccess(3)
         , XNameAccess("crdbus50")
-        , XAutoTextContainer("crdbus50")
     {
     }
 
@@ -70,8 +68,6 @@ public:
     CPPUNIT_TEST(testGetByIndex);
     CPPUNIT_TEST(testGetElementType);
     CPPUNIT_TEST(testHasElements);
-    CPPUNIT_TEST(testInsertNewByName);
-    CPPUNIT_TEST(testRemoveByName);
     CPPUNIT_TEST_SUITE_END();
 };
 

Reply via email to