diff options
author | Armin Le Grand <Armin.Le.Grand@me.com> | 2019-04-08 10:32:10 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@me.com> | 2019-05-05 18:45:13 +0200 |
commit | 541b30bac20690325c086a891bb83d2b88c715bf (patch) | |
tree | 89e4dadc3fcaff874c262c4d5e0b4b387bf91e46 | |
parent | cbb77a7990d388080dd2875876b04f7c2c7a40d5 (diff) |
WIP: Adapted test, simplified cleanup
Change-Id: I38ec293f0a5c03f2bbaf0ddfeebe8a6567ddb4de
-rw-r--r-- | basctl/source/basicide/sbxitem.cxx | 5 | ||||
-rw-r--r-- | include/item/base/ItemBase.hxx | 5 | ||||
-rw-r--r-- | include/item/base/ItemBaseStaticHelper.hxx | 2 | ||||
-rw-r--r-- | include/item/base/ItemSet.hxx | 2 | ||||
-rw-r--r-- | item/source/base/ItemBase.cxx | 8 | ||||
-rw-r--r-- | item/source/simple/CntInt16.cxx | 5 | ||||
-rw-r--r-- | item/source/simple/CntOUString.cxx | 5 | ||||
-rw-r--r-- | item/test/ItemTest.cxx | 346 |
8 files changed, 309 insertions, 69 deletions
diff --git a/basctl/source/basicide/sbxitem.cxx b/basctl/source/basicide/sbxitem.cxx index cc51573f5faf..2b20734357f6 100644 --- a/basctl/source/basicide/sbxitem.cxx +++ b/basctl/source/basicide/sbxitem.cxx @@ -44,10 +44,7 @@ namespace Item Sbx::~Sbx() { - if(IsAdministrated()) - { - GetStaticAdmin().HintExpired(this); - } + implInstanceCleanup(); } std::shared_ptr<const Sbx> Sbx::Create(const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aName, const OUString& aMethodName, ItemType eType) diff --git a/include/item/base/ItemBase.hxx b/include/item/base/ItemBase.hxx index 7511dee4a485..d06f766a4212 100644 --- a/include/item/base/ItemBase.hxx +++ b/include/item/base/ItemBase.hxx @@ -130,9 +130,14 @@ namespace Item // representations for special purposes, e.g. InvalidateItem/DisableItem virtual ItemAdministrator* GetIAdministrator() const; + // PutValue/Any interface for automated instance creation from SfxType + // mechanism (UNO API and sfx2 stuff) void PutValues(const AnyIDArgs& rArgs); virtual void PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId); + // Cleanup helper for virtual destructor + void implInstanceCleanup(); + public: virtual ~ItemBase(); diff --git a/include/item/base/ItemBaseStaticHelper.hxx b/include/item/base/ItemBaseStaticHelper.hxx index 35224204ad70..29c228059836 100644 --- a/include/item/base/ItemBaseStaticHelper.hxx +++ b/include/item/base/ItemBaseStaticHelper.hxx @@ -53,7 +53,7 @@ namespace Item return std::static_pointer_cast<const TargetType>(GetStaticAdmin().GetDefault()); } - static bool IsDefault(const std::shared_ptr<const TargetType>& rCandidate) + static bool IsStaticDefault(const std::shared_ptr<const TargetType>& rCandidate) { return rCandidate && GetStaticAdmin().IsDefault(rCandidate.get()); } diff --git a/include/item/base/ItemSet.hxx b/include/item/base/ItemSet.hxx index f2d42ef28247..7be0092f5ddf 100644 --- a/include/item/base/ItemSet.hxx +++ b/include/item/base/ItemSet.hxx @@ -291,7 +291,7 @@ namespace Item template< typename TItem > std::shared_ptr<TItem> GetDefault() const { // get static available default as instance - ItemBase::SharedPtr aRetval(TItem::GetDefault()); + ItemBase::SharedPtr aRetval(TItem::GetStaticDefault()); assert(aRetval && "empty ItemBase::SharedPtr not allowed for default (!)"); if(m_aModelSpecificIValues) diff --git a/item/source/base/ItemBase.cxx b/item/source/base/ItemBase.cxx index 533d462f0dc4..f4b5705aae2e 100644 --- a/item/source/base/ItemBase.cxx +++ b/item/source/base/ItemBase.cxx @@ -234,6 +234,14 @@ namespace Item assert(false && "Error: Some instance tries to set an Any at an ::Item instance where this is not supported - implement ItemBase::PutValue method there (!)"); } + void ItemBase::implInstanceCleanup() + { + if(IsAdministrated()) + { + GetIAdministrator()->HintExpired(this); + } + } + ItemBase::~ItemBase() { } diff --git a/item/source/simple/CntInt16.cxx b/item/source/simple/CntInt16.cxx index 1be28617940a..2bbbc1dc240e 100644 --- a/item/source/simple/CntInt16.cxx +++ b/item/source/simple/CntInt16.cxx @@ -32,10 +32,7 @@ namespace Item // needs to be called from here to have the fully derived implementation type // in the helper method - do NOT move to a imaginable general // implementation in ItemBaseStaticHelper (!) - if(IsAdministrated()) - { - GetStaticAdmin().HintExpired(this); - } + implInstanceCleanup(); } CntInt16::SharedPtr CntInt16::Create(sal_Int16 nValue) diff --git a/item/source/simple/CntOUString.cxx b/item/source/simple/CntOUString.cxx index 9bdd59c808f9..b18a9340a690 100644 --- a/item/source/simple/CntOUString.cxx +++ b/item/source/simple/CntOUString.cxx @@ -32,10 +32,7 @@ namespace Item // needs to be called from here to have the fully derived implementation type // in the helper method - do NOT move to a imaginable general // implementation in ItemBaseStaticHelper (!) - if(IsAdministrated()) - { - GetStaticAdmin().HintExpired(this); - } + implInstanceCleanup(); } std::shared_ptr<const CntOUString> CntOUString::Create(const rtl::OUString& rValue) diff --git a/item/test/ItemTest.cxx b/item/test/ItemTest.cxx index 539fe5491c19..6b0029bdd9c3 100644 --- a/item/test/ItemTest.cxx +++ b/item/test/ItemTest.cxx @@ -22,59 +22,68 @@ namespace Item { // example for multi value Item - class CntMultiValue; - typedef ItemBaseStaticHelper<CntMultiValue, IAdministrator_vector> CntMultiValueStaticHelper; + class MultiValueAB; + typedef ItemBaseStaticHelper<MultiValueAB, IAdministrator_vector> MultiValueStaticHelperAB; // if this should be based on faster IAdministrator_set, changes needed would be: - // - typedef ItemBaseStaticHelper<CntMultiValue, IAdministrator_set> CntMultiValueStaticHelper; + // - typedef ItemBaseStaticHelper<MultiValueAB, IAdministrator_set> MultiValueStaticHelperAB; // - define virtual bool operator<(const ItemBase& rCandidate) const override - class CntMultiValue : public CntMultiValueStaticHelper + class MultiValueAB : public MultiValueStaticHelperAB, public ItemBase { + public: + // SharedPtr typedef to be used handling instances of given type + typedef std::shared_ptr<const MultiValueAB> SharedPtr; + + private: + // need to offer internal access to ItemAdministrator + // in each derivation - just calls GetStaticAdmin internally + virtual ItemAdministrator* GetIAdministrator() const override + { + return &MultiValueStaticHelperAB::GetStaticAdmin(); + } + private: sal_Int16 m_nValueA; sal_Int32 m_nValueB; - sal_Int64 m_nValueC; protected: - friend CntMultiValueStaticHelper; + friend MultiValueStaticHelperAB; - CntMultiValue(sal_Int16 nValueA = 0, sal_Int16 nValueB = 0, sal_Int16 nValueC = 0) - : CntMultiValueStaticHelper(), + MultiValueAB(sal_Int16 nValueA = 0, sal_Int16 nValueB = 0) + : MultiValueStaticHelperAB(), + ItemBase(), m_nValueA(nValueA), - m_nValueB(nValueB), - m_nValueC(nValueC) + m_nValueB(nValueB) { } public: - virtual ~CntMultiValue() + virtual ~MultiValueAB() { // needs to be called from here to have the fully derived implementation type // in the helper method - do NOT move to a imaginable general // implementation in ItemBaseStaticHelper (!) - if(IsAdministrated()) - { - GetStaticAdmin().HintExpired(this); - } + implInstanceCleanup(); } - static std::shared_ptr<const CntMultiValue> Create(sal_Int16 nValueA, sal_Int16 nValueB, sal_Int16 nValueC) + static std::shared_ptr<const MultiValueAB> Create(sal_Int16 nValueA, sal_Int16 nValueB) { // use ::Create(...) method with local incarnation, it will handle // - detection of being default (will delete local incarnation) // - detection of reuse (will delete local incarnation) // - detectiomn of new use - will create shared_ptr for local incarnation and buffer - return std::static_pointer_cast<const CntMultiValue>(GetStaticAdmin().Create(new CntMultiValue(nValueA, nValueB, nValueC))); + return std::static_pointer_cast<const MultiValueAB>( + MultiValueStaticHelperAB::GetStaticAdmin().Create( + new MultiValueAB(nValueA, nValueB))); } virtual bool operator==(const ItemBase& rCandidate) const override { assert(ItemBase::operator==(rCandidate)); - const CntMultiValue& rCand(static_cast<const CntMultiValue&>(rCandidate)); + const MultiValueAB& rCand(static_cast<const MultiValueAB&>(rCandidate)); return (GetValueA() == rCand.GetValueA() - && GetValueB() == rCand.GetValueB() - && GetValueC() == rCand.GetValueC()); + && GetValueB() == rCand.GetValueB()); } sal_Int16 GetValueA() const @@ -87,6 +96,79 @@ namespace Item return m_nValueB; } + // virtual bool operator<(const ItemBase& rCandidate) const override + // { + // assert(ItemBase::operator==(rCandidate)); + // return static_cast<const MultiValueAB*>(this)->GetValueA() < static_cast<const MultiValueAB&>(rCandidate).GetValueA() + // && static_cast<const MultiValueAB*>(this)->GetValueB() < static_cast<const MultiValueAB&>(rCandidate).GetValueB(); + // } + }; +} // end of namespace Item + +/////////////////////////////////////////////////////////////////////////////// + +namespace Item +{ + // example for multi value Item deived from already defined one, + // adding parameters (only one here) + class MultiValueABC; + typedef ItemBaseStaticHelper<MultiValueABC, IAdministrator_vector> MultiValueStaticHelperABC; + + class MultiValueABC : public MultiValueAB, public MultiValueStaticHelperABC + { + public: + // SharedPtr typedef to be used handling instances of given type + typedef std::shared_ptr<const MultiValueABC> SharedPtr; + + private: + // need to offer internal access to ItemAdministrator + // in each derivation - just calls GetStaticAdmin internally + virtual ItemAdministrator* GetIAdministrator() const override + { + return &MultiValueStaticHelperABC::GetStaticAdmin(); + } + + private: + sal_Int64 m_nValueC; + + protected: + friend MultiValueStaticHelperABC; + + MultiValueABC(sal_Int16 nValueA = 0, sal_Int16 nValueB = 0, sal_Int16 nValueC = 0) + : MultiValueAB(nValueA, nValueB), + MultiValueStaticHelperABC(), + m_nValueC(nValueC) + { + } + + public: + virtual ~MultiValueABC() + { + // needs to be called from here to have the fully derived implementation type + // in the helper method - do NOT move to a imaginable general + // implementation in ItemBaseStaticHelper (!) + implInstanceCleanup(); + } + + static std::shared_ptr<const MultiValueABC> Create(sal_Int16 nValueA, sal_Int16 nValueB, sal_Int16 nValueC) + { + // use ::Create(...) method with local incarnation, it will handle + // - detection of being default (will delete local incarnation) + // - detection of reuse (will delete local incarnation) + // - detectiomn of new use - will create shared_ptr for local incarnation and buffer + return std::static_pointer_cast<const MultiValueABC>( + MultiValueStaticHelperABC::GetStaticAdmin().Create( + new MultiValueABC(nValueA, nValueB, nValueC))); + } + + virtual bool operator==(const ItemBase& rCandidate) const override + { + assert(ItemBase::operator==(rCandidate)); + const MultiValueABC& rCand(static_cast<const MultiValueABC&>(rCandidate)); + return (MultiValueAB::operator==(rCandidate) + && GetValueC() == rCand.GetValueC()); + } + sal_Int16 GetValueC() const { return m_nValueC; @@ -95,9 +177,8 @@ namespace Item // virtual bool operator<(const ItemBase& rCandidate) const override // { // assert(ItemBase::operator==(rCandidate)); - // return static_cast<const CntMultiValue*>(this)->GetValueA() < static_cast<const CntMultiValue&>(rCandidate).GetValueA() - // && static_cast<const CntMultiValue*>(this)->GetValueB() < static_cast<const CntMultiValue&>(rCandidate).GetValueB() - // && static_cast<const CntMultiValue*>(this)->GetValueC() < static_cast<const CntMultiValue&>(rCandidate).GetValueC(); + // return MultiValueAB::operator<(rCandidate) + // && static_cast<const MultiValueABC*>(this)->GetValueC() < static_cast<const MultiValueABC&>(rCandidate).GetValueC(); // } }; } // end of namespace Item @@ -106,13 +187,50 @@ namespace Item namespace Item { + // example for Item deived from existing ojne, only new type + class MultiValueAB_Alternative : public MultiValueAB + { + public: + // SharedPtr typedef to be used handling instances of given type + typedef std::shared_ptr<const MultiValueAB_Alternative> SharedPtr; + + protected: + MultiValueAB_Alternative(sal_Int16 nValueA = 0, sal_Int16 nValueB = 0) + : MultiValueAB(nValueA, nValueB) + { + } + + public: + static std::shared_ptr<const MultiValueAB_Alternative> Create(sal_Int16 nValueA, sal_Int16 nValueB) + { + // use ::Create(...) method with local incarnation, it will handle + // - detection of being default (will delete local incarnation) + // - detection of reuse (will delete local incarnation) + // - detectiomn of new use - will create shared_ptr for local incarnation and buffer + return std::static_pointer_cast<const MultiValueAB_Alternative>( + MultiValueStaticHelperAB::GetStaticAdmin().Create( + new MultiValueAB_Alternative(nValueA, nValueB))); + } + + virtual bool operator==(const ItemBase& rCandidate) const override + { + assert(ItemBase::operator==(rCandidate)); + return (MultiValueAB::operator==(rCandidate)); + } + }; +} // end of namespace Item + +/////////////////////////////////////////////////////////////////////////////// + +namespace Item +{ class ibase : public CppUnit::TestFixture { private: public: - void checkCntMultiValue() + void checkMultiValue() { - // make direct use of local CntMultiValue item + // make direct use of local MultiValueAB item // for debug, change bLoop to true, start, attach and set to // false again to debug (one possibility...) @@ -123,69 +241,185 @@ namespace Item } // to see the diff between IAdministrator_vector and - // IAdministrator_set, see instructions in CntMultiValue above, + // IAdministrator_set, see instructions in MultiValueAB above, // create version for IAdministrator_set and raise this number. // this demonstrates how/why this should be much faster than // current SfxPoolItem/SfxItemSet/SfxItemPool stuff ... int nIncrement(0); - CntMultiValue::SharedPtr mhas3(CntMultiValue::Create(5,2,8)); - CntMultiValue::SharedPtr mhas4(CntMultiValue::Create(2,3,0)); + MultiValueAB::SharedPtr mhas3(MultiValueAB::Create(5,2)); + MultiValueAB::SharedPtr mhas4(MultiValueAB::Create(2,3)); + + if(MultiValueStaticHelperAB::IsStaticDefault(MultiValueAB::Create(3,0))) + { + nIncrement++; + } - if(CntMultiValue::IsDefault(CntMultiValue::Create(3,0,0))) + if(MultiValueStaticHelperAB::IsStaticDefault(MultiValueAB::Create(8,7))) { nIncrement++; } - if(CntMultiValue::IsDefault(CntMultiValue::Create(8,7,6))) + if(MultiValueStaticHelperAB::IsStaticDefault(MultiValueStaticHelperAB::GetStaticDefault())) { nIncrement++; } - if(CntMultiValue::IsDefault(CntMultiValue::GetDefault())) + if(MultiValueStaticHelperABC::IsStaticDefault(MultiValueStaticHelperABC::GetStaticDefault())) { nIncrement++; } - CntMultiValue::SharedPtr testAA(CntMultiValue::Create(11,22,99)); - std::vector<CntMultiValue::SharedPtr> test; + MultiValueAB::SharedPtr testAA(MultiValueAB::Create(11,22)); + std::vector<MultiValueAB::SharedPtr> test; const sal_uInt32 nLoopNumber(50); for(sal_uInt32 aloop(0); aloop < nLoopNumber; aloop++) { - test.push_back(CntMultiValue::Create(aloop+1, (aloop+1)*2, (aloop+1)*4)); + test.push_back(MultiValueAB::Create(aloop+1, (aloop+1)*2)); } - CntMultiValue::SharedPtr testA(CntMultiValue::Create(2,4,8)); - CntMultiValue::SharedPtr testB(CntMultiValue::Create(2,4,9)); + MultiValueAB::SharedPtr testA(MultiValueAB::Create(2,4)); + MultiValueAB::SharedPtr testB(MultiValueAB::Create(2,3)); for(sal_uInt32 dloop(0); dloop < nLoopNumber; dloop+=2) { test[dloop] = nullptr; if(dloop%5) - test.push_back(CntMultiValue::Create(dloop+1, (dloop+1)*2, (dloop+1)*4)); + { + test.push_back(MultiValueAB::Create(dloop+1, (dloop+1)*2)); + } } for(sal_uInt32 eloop(1); eloop < (nLoopNumber * 2) / 3; eloop+=2) { test[eloop] = nullptr; if(eloop%7) - test.push_back(CntMultiValue::Create(eloop+1, (eloop+1)*2, (eloop+1)*4)); + { + test.push_back(MultiValueAB::Create(eloop+1, (eloop+1)*2)); + } } test.clear(); } - void checkCntMultiValueAtISet() + void checkMultiValueDerived() + { + // make direct use of local MultiValueABC item + int nIncrement(0); + + MultiValueABC::SharedPtr mhas3x(MultiValueABC::Create(5,2,5)); + MultiValueABC::SharedPtr mhas4x(MultiValueABC::Create(2,3,7)); + + if(MultiValueStaticHelperABC::IsStaticDefault(MultiValueABC::Create(3,0,5))) + { + nIncrement++; + } + + if(MultiValueStaticHelperABC::IsStaticDefault(MultiValueABC::Create(8,7,12))) + { + nIncrement++; + } + + if(MultiValueStaticHelperABC::IsStaticDefault(MultiValueStaticHelperABC::GetStaticDefault())) + { + nIncrement++; + } + + std::vector<MultiValueABC::SharedPtr> testx; + const sal_uInt32 nLoopNumber(50); + + for(sal_uInt32 aloop(0); aloop < nLoopNumber; aloop++) + { + testx.push_back(MultiValueABC::Create(aloop+1, (aloop+1)*2, (aloop+1)*4)); + } + + MultiValueABC::SharedPtr testAx(MultiValueABC::Create(2,4,3)); + MultiValueABC::SharedPtr testBx(MultiValueABC::Create(2,4,6)); + + for(sal_uInt32 dloop(0); dloop < nLoopNumber; dloop+=2) + { + testx[dloop] = nullptr; + if(dloop%5) + { + testx.push_back(MultiValueABC::Create(dloop+1, (dloop+1)*2, (dloop+1)*4)); + } + } + + for(sal_uInt32 eloop(1); eloop < (nLoopNumber * 2) / 3; eloop+=2) + { + testx[eloop] = nullptr; + if(eloop%7) + { + testx.push_back(MultiValueABC::Create(eloop+1, (eloop+1)*2, 123)); + } + } + + testx.clear(); + } + + void checkMultiValueAlternative() + { + int nIncrement(0); + const sal_uInt32 nLoopNumber(50); + MultiValueAB_Alternative::SharedPtr mhas3_A(MultiValueAB_Alternative::Create(5,2)); + + if(MultiValueStaticHelperAB::IsStaticDefault(MultiValueAB_Alternative::Create(3,0))) + { + nIncrement++; + } + + if(MultiValueStaticHelperAB::IsStaticDefault(MultiValueAB_Alternative::Create(8,7))) + { + nIncrement++; + } + + if(MultiValueStaticHelperAB::IsStaticDefault(MultiValueStaticHelperAB::GetStaticDefault())) + { + nIncrement++; + } + + std::vector<MultiValueAB_Alternative::SharedPtr> testAB_A; + + for(sal_uInt32 aloop(0); aloop < nLoopNumber; aloop++) + { + testAB_A.push_back(MultiValueAB_Alternative::Create(aloop+1, (aloop+1)*2)); + } + + MultiValueAB_Alternative::SharedPtr testA_A(MultiValueAB_Alternative::Create(2,4)); + MultiValueAB_Alternative::SharedPtr testB_A(MultiValueAB_Alternative::Create(2,3)); + + for(sal_uInt32 dloop(0); dloop < nLoopNumber; dloop+=2) + { + testAB_A[dloop] = nullptr; + if(dloop%5) + { + testAB_A.push_back(MultiValueAB_Alternative::Create(dloop+1, (dloop+1)*2)); + } + } + + for(sal_uInt32 eloop(1); eloop < (nLoopNumber * 2) / 3; eloop+=2) + { + testAB_A[eloop] = nullptr; + if(eloop%7) + { + testAB_A.push_back(MultiValueAB_Alternative::Create(eloop+1, (eloop+1)*2)); + } + } + + testAB_A.clear(); + } + + void checkMultiValueAtISet() { int nIncrement(0); - // make use of local CntMultiValue item in conjuction with ItemSet + // make use of local MultiValueAB item in conjuction with ItemSet ModelSpecificItemValues::SharedPtr aModelSpecificIValues(ModelSpecificItemValues::Create()); ItemSet::SharedPtr aSet(ItemSet::Create(aModelSpecificIValues)); - aSet->SetItem(CntMultiValue::Create(5,4,3)); + aSet->SetItem(MultiValueAB::Create(5,4)); - if(const auto Item(aSet->GetStateAndItem<const CntMultiValue>()); Item.IsSet()) + if(const auto Item(aSet->GetStateAndItem<const MultiValueAB>()); Item.IsSet()) { nIncrement += (ItemSet::IState::SET == Item.GetIState()) ? 1 : 0; nIncrement += (Item.GetItem()) ? 1 : 0; @@ -226,12 +460,12 @@ namespace Item a_sp = CntInt16::Create(3); b_sp = CntInt16::Create(5); c_sp = CntInt16::Create(7); - theDefault = CntInt16::GetDefault(); + theDefault = CntInt16::GetStaticDefault(); sa_sp = CntOUString::Create("Hello"); sb_sp = CntOUString::Create("World"); sc_sp = CntOUString::Create("..of Doom!"); - stheDefault = CntOUString::GetDefault(); + stheDefault = CntOUString::GetStaticDefault(); } /////////////////////////////////////////////////////////////////////////////// @@ -239,17 +473,17 @@ namespace Item CntInt16::SharedPtr has3(CntInt16::Create(3)); CntInt16::SharedPtr has4(CntInt16::Create(4)); - if(CntInt16::IsDefault(CntInt16::Create(11))) + if(CntInt16::IsStaticDefault(CntInt16::Create(11))) { nIncrement++; } - if(CntInt16::IsDefault(CntInt16::Create(0))) + if(CntInt16::IsStaticDefault(CntInt16::Create(0))) { nIncrement++; } - if(CntInt16::IsDefault(theDefault)) + if(CntInt16::IsStaticDefault(theDefault)) { nIncrement++; } @@ -268,17 +502,17 @@ namespace Item CntOUString::SharedPtr shas3(CntOUString::Create("Hello")); CntOUString::SharedPtr shas4(CntOUString::Create("WhateverComesAlong")); - if(CntOUString::IsDefault(CntOUString::Create("NotDefault"))) + if(CntOUString::IsStaticDefault(CntOUString::Create("NotDefault"))) { nIncrement++; } - if(CntOUString::IsDefault(CntOUString::Create(OUString()))) + if(CntOUString::IsStaticDefault(CntOUString::Create(OUString()))) { nIncrement++; } - if(CntOUString::IsDefault(stheDefault)) + if(CntOUString::IsStaticDefault(stheDefault)) { nIncrement++; } @@ -320,7 +554,7 @@ namespace Item aSet->SetItem(CntInt16::Create(4)); const auto aActA(aSet->GetStateAndItem<const CntInt16>()); - aSet->SetItem(CntInt16::GetDefault()); + aSet->SetItem(CntInt16::GetStaticDefault()); const auto aActB(aSet->GetStateAndItem<const CntInt16>()); aSet->SetItem(CntInt16::Create(12)); @@ -353,9 +587,9 @@ namespace Item } // check getting default at Set, this will include ModelSpecificItemValues - // compared with the static CntInt16::GetDefault() call + // compared with the static CntInt16::GetStaticDefault() call const CntInt16::SharedPtr aDefSet(aSet->GetDefault<const CntInt16>()); - const CntInt16::SharedPtr aDefGlobal(CntInt16::GetDefault()); + const CntInt16::SharedPtr aDefGlobal(CntInt16::GetStaticDefault()); const bool bClA(aSet->ClearItem<const CntInt16>()); nIncrement += bClA; @@ -369,8 +603,10 @@ namespace Item // because these macros are need by auto register mechanism. CPPUNIT_TEST_SUITE(ibase); - CPPUNIT_TEST(checkCntMultiValue); - CPPUNIT_TEST(checkCntMultiValueAtISet); + CPPUNIT_TEST(checkMultiValue); + CPPUNIT_TEST(checkMultiValueDerived); +// CPPUNIT_TEST(checkMultiValueAlternative); + CPPUNIT_TEST(checkMultiValueAtISet); CPPUNIT_TEST(checkSimpleItems); CPPUNIT_TEST(checkSimpleItemsAtISet); CPPUNIT_TEST_SUITE_END(); |