Skip to content
Snippets Groups Projects
Commit 5aa9bbfc authored by Scott Snyder's avatar Scott Snyder Committed by Graeme Stewart
Browse files

'Update reference files for Gaudi changes.' (ControlTest-00-02-71)

	* Tagging ControlTest-00-02-71.
	* Update reference files for Gaudi changes.

2016-12-13  scott snyder  <snyder@bnl.gov>

	* Tagging ControlTest-00-02-70.
	* Update for StoreGate-03-08-05.

2016-09-24  scott snyder  <snyder@bnl.gov>

	* Tagging ControlTest-00-02-69.
	* Update for StoreGate-03-07-14.

2016-08-26  scott snyder  <snyder@bnl.gov>

	* Tagging ControlTest-00-02-68.
	* Further clang-tidy fixes.
	* Tagging ControlTest-00-02-67.
	* clang-tidy: Use nullptr.
...
(Long ChangeLog diff - truncated)
parent cdc639ad
No related merge requests found
Showing
with 801 additions and 844 deletions
# $Id: CMakeLists.txt 757711 2016-06-26 13:59:12Z ssnyder $
# $Id: CMakeLists.txt 764877 2016-07-28 01:48:11Z ssnyder $
################################################################################
# Package: ControlTest
################################################################################
......@@ -111,7 +111,7 @@ endif()
atlas_add_test( StoreGateReentrant
SCRIPT test/StoreGateReentrant.sh
PROPERTIES TIMEOUT 300
EXTRA_PATTERNS "^Py:ConfigurableDb +(WARNING|INFO|ERROR)|Py:Athena +INFO including file |Warning in .TEnvRec::ChangeValue.: duplicate entry|ToolSvc.finalize.. +INFO|^WriteData +INFO in initialize$$| [A-Z]+ 2[0-9][0-9][0-9]$$${SGGoptignore}|^Py:Athena +INFO|[Rr]oo[Ff]it|NIKHEF|DeprecationWarning: object.__new__|^ newobj =|^\*+$$|drop-and-reload|^ *$$|we will keep the configuration around|object not modifiable when retrieved|Retrieved const handle to default|type EventInfo|^StoreGateSvc +DEBUG|^ of type|object modifiable when retrieved|ApplicationMgr +INFO|Start StoreGateSvc" )
EXTRA_PATTERNS "^Py:ConfigurableDb +(WARNING|INFO|ERROR)|Py:Athena +INFO including file |Warning in .TEnvRec::ChangeValue.: duplicate entry|ToolSvc.finalize.. +INFO|^WriteData +INFO in initialize$$| [A-Z]+ 2[0-9][0-9][0-9]$$${SGGoptignore}|^Py:Athena +INFO|[Rr]oo[Ff]it|NIKHEF|DeprecationWarning: object.__new__|^ newobj =|^\*+$$|drop-and-reload|^ *$$|we will keep the configuration around|object not modifiable when retrieved|Retrieved const handle to default|type EventInfo|^StoreGateSvc +DEBUG|^ of type|object modifiable when retrieved|ApplicationMgr +INFO|Start StoreGateSvc|TExMapRemove" )
atlas_add_test( StoreGateGen
SCRIPT test/StoreGateGen.sh
......
......@@ -85,7 +85,7 @@ use AthExStoreGateExample AthExStoreGateExample-* Control/AthenaExamples -no_a
apply_pattern athenarun_test name="StoreGateReentrant" \
pre_script="../cmt/setup.sh" \
options="AthExStoreGateExample/StoreGateExample_Reentrant_jobOptions.py" \
post_script="${TESTTOOLSROOT}/share/post.sh StoreGateReentrant $(q)^Py:ConfigurableDb +(WARNING|INFO|ERROR)|Py:Athena +INFO including file |Warning in .TEnvRec::ChangeValue.: duplicate entry|ToolSvc.finalize.. +INFO|^WriteData +INFO in initialize$$| [A-Z]+ 2[0-9][0-9][0-9]$$$(SGGoptignore)|^Py:Athena +INFO|[Rr]oo[Ff]it|NIKHEF|DeprecationWarning: object.__new__|^ newobj =|^\*+$$|drop-and-reload|^ *$$|we will keep the configuration around|object not modifiable when retrieved|Retrieved const handle to default|type EventInfo|^StoreGateSvc +DEBUG|^ of type|object modifiable when retrieved|ApplicationMgr +INFO|Start StoreGateSvc$(q)"
post_script="${TESTTOOLSROOT}/share/post.sh StoreGateReentrant $(q)^Py:ConfigurableDb +(WARNING|INFO|ERROR)|Py:Athena +INFO including file |Warning in .TEnvRec::ChangeValue.: duplicate entry|ToolSvc.finalize.. +INFO|^WriteData +INFO in initialize$$| [A-Z]+ 2[0-9][0-9][0-9]$$$(SGGoptignore)|^Py:Athena +INFO|[Rr]oo[Ff]it|NIKHEF|DeprecationWarning: object.__new__|^ newobj =|^\*+$$|drop-and-reload|^ *$$|we will keep the configuration around|object not modifiable when retrieved|Retrieved const handle to default|type EventInfo|^StoreGateSvc +DEBUG|^ of type|object modifiable when retrieved|ApplicationMgr +INFO|Start StoreGateSvc|TExMap::Remove$(q)"
apply_pattern athenarun_test name="StoreGateGen" \
pre_script="../cmt/setup.sh" \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -32,7 +32,7 @@ int main() {
}
assert(pSvcLoc);
StoreGateSvc* pStore(0);
StoreGateSvc* pStore(nullptr);
static const bool CREATE(true);
assert((pSvcLoc->service("StoreGateSvc", pStore, CREATE)).isSuccess());
assert(pStore);
......
......@@ -96,7 +96,7 @@ int main() {
assert( (DataProxy_cast<Bla>(transientProxy)).i == 77 );
IConversionSvc* pIConvSvc(0);
IConversionSvc* pIConvSvc(nullptr);
StatusCode cs((pSvcLoc->service("EventPersistencySvc", pIConvSvc, CREATEIF)));
assert(cs.isSuccess());
assert(pIConvSvc);
......@@ -126,7 +126,7 @@ int main() {
fRef.doNothing(); //remove warning
IProxyProviderSvc* pIPPSvc(0);
IProxyProviderSvc* pIPPSvc(nullptr);
StatusCode psc(pSvcLoc->service("ProxyProviderSvc", pIPPSvc, CREATEIF));
assert( psc.isSuccess() );
assert( pIPPSvc );
......
......@@ -66,16 +66,16 @@ CLASS_DEF(FooBar, 8109, 0)
template <typename PROXIED>
class TestProvider : public IAddressProvider {
public:
TestProvider(string key) :
TestProvider(const std::string& key) :
m_ID(ClassID_traits<PROXIED>::ID()), m_key(key)
{ }
virtual ~TestProvider() {}
~TestProvider() override {}
///get all addresses that the provider wants to preload in SG maps
virtual StatusCode loadAddresses(StoreID::type /*id*/, tadList& /* tList */)
StatusCode loadAddresses(StoreID::type /*id*/, tadList& /* tList */) override
{return StatusCode::SUCCESS;}
virtual StatusCode preLoadAddresses(StoreID::type /*id*/, tadList& tList)
StatusCode preLoadAddresses(StoreID::type /*id*/, tadList& tList) override
{
TransientAddress* tad = new TransientAddress(m_ID, m_key, new GenericAddress(ToyConversionSvc::storageType(), m_ID,m_key));
tList.push_back(tad);
......@@ -83,7 +83,7 @@ public:
}
///get a specific address, plus all others the provider wants to load in SG maps
virtual StatusCode updateAddress(StoreID::type /*sID*/, TransientAddress* tad)
StatusCode updateAddress(StoreID::type /*sID*/, TransientAddress* tad) override
{
StatusCode sc;
if ((tad->clID() != m_ID) || (tad->name() != m_key)) {
......@@ -105,9 +105,9 @@ private:
void testRecordBeforeRead(StoreGateSvc& rSG, IProxyProviderSvc& rPPS) {
cout << "*** ProxyProviderSvc_test RecordBeforeRead BEGINS ***" <<endl;
rSG.clearStore().isSuccess();
rSG.clearStore().ignore();
rPPS.addProvider(new TestProvider<Foo>("existingFoo"));
const Foo *pFoo(0);
const Foo *pFoo(nullptr);
//NOT YET SGASSERTERROR(rSG.record(new Foo(6.28), "existingFoo").isSuccess());
assert(rSG.record(new Foo(6.28), "existingFoo").isSuccess());
assert(rSG.retrieve(pFoo, "existingFoo").isSuccess());
......@@ -119,10 +119,10 @@ void testReadPrivate(StoreGateSvc& rSG) {
cout << "*** ProxyProviderSvc_test readPrivate BEGINS ***" <<endl;
std::unique_ptr<Foo> apFoo;
SGASSERTERROR((rSG.readPrivateCopy<Foo>("NotThere")).get() != 0);
SGASSERTERROR((rSG.readPrivateCopy<Foo>("NotThere")).get() != nullptr);
apFoo=rSG.readUniquePrivateCopy<Foo>("diskFoo");
assert(0 != apFoo.get());
assert(nullptr != apFoo.get());
assert(floatEQ(0, static_cast<float>(apFoo->a()))); //check that our Foo is the def constr one
//now test the situation in which we have a transient obj in the way
......@@ -132,16 +132,16 @@ void testReadPrivate(StoreGateSvc& rSG) {
assert(rSG.overwrite(CxxUtils::make_unique<Foo>(6.28), "privFoo").isSuccess());
apFoo=rSG.readUniquePrivateCopy<Foo>("privFoo");
assert(0 != apFoo.get());
assert(nullptr != apFoo.get());
assert(floatNEQ(6.28f, static_cast<float>(apFoo->a()))); //check that our Foo is a different one
apFoo->setA(3.14);
std::unique_ptr<Foo> bpFoo(rSG.readUniquePrivateCopy<Foo>("privFoo"));
assert(0 != bpFoo.get());
assert(nullptr != bpFoo.get());
assert(&*bpFoo != &*apFoo); //two independent instances
assert(floatNEQ(6.28f, static_cast<float>(bpFoo->a())));
assert(floatNEQ(3.14f, static_cast<float>(bpFoo->a())));
assert(floatEQ(3.14f, static_cast<float>(apFoo->a())));
const Foo* plainFoo(0);
const Foo* plainFoo(nullptr);
assert(plainFoo = rSG.retrieve<Foo>("privFoo"));
assert(floatEQ(6.28f, static_cast<float>(plainFoo->a()))); //this is the old guy!
assert(plainFoo != &*apFoo); //yet another instance
......@@ -152,16 +152,16 @@ void testReadPrivate(StoreGateSvc& rSG) {
const Foo* pFoo33Orig = apFoo.get();
assert(rSG.record(std::move(apFoo), "silly33").isSuccess());
const Foo *pFoo33(rSG.retrieve<Foo>("silly33"));
assert(0 != pFoo33);
assert(nullptr != pFoo33);
assert(floatEQ(3.14f, static_cast<float>(pFoo33->a())));
assert(pFoo33 == pFoo33Orig); //the private copy we recorded.
assert(pFoo33 != &*bpFoo); //not one of the private copies
SGASSERTERROR((rSG.readPrivateCopy<Foo>("silly33")).get() != 0);
SGASSERTERROR((rSG.readPrivateCopy<Foo>("silly33")).get() != nullptr);
assert(rSG.retrieve<Foo>("silly33"));
std::unique_ptr<Foo> aptrFoo33(rSG.retrieveUniquePrivateCopy<Foo>("silly33"));
assert(aptrFoo33.get() == pFoo33);
assert(floatEQ(3.14f, static_cast<float>(aptrFoo33->a())));
SGASSERTERROR((pFoo33 = rSG.retrieve<Foo>("silly33")) != 0);
SGASSERTERROR((pFoo33 = rSG.retrieve<Foo>("silly33")) != nullptr);
cout << "*** ProxyProviderSvc_test readPrivate OK ***\n\n" <<endl;
......@@ -229,14 +229,14 @@ void testOverwrite(StoreGateSvc& rSG, IProxyProviderSvc& rPPS) {
}
int main() {
ISvcLocator* pSvcLoc(0);
ISvcLocator* pSvcLoc(nullptr);
if (!initGaudi("ProxyProviderSvc_test.txt", pSvcLoc)) {
cerr << "This test can not be run" << endl;
return 0;
}
assert( pSvcLoc );
StoreGateSvc* pStore(0);
StoreGateSvc* pStore(nullptr);
static const bool CREATE(true);
assert( (pSvcLoc->service("StoreGateSvc", pStore, CREATE)).isSuccess() );
assert( pStore );
......@@ -263,14 +263,14 @@ int main() {
assert( !(pStore->transientContains<Foo>("aFoo")) );
assert( pStore->contains<Foo>("aFoo") );
const Foo* pFoo(0);
const Foo* pFoo(nullptr);
assert( (pStore->retrieve(pFoo, "aFoo")).isSuccess() );
assert( pFoo );
const FooBar* pFooBar(0);
const FooBar* pFooBar(nullptr);
SGASSERTERROR( (pStore->retrieve(pFooBar, "aFooBar")).isSuccess() );
assert( 0 == pFooBar );
assert( nullptr == pFooBar );
cout << "*** ProxyProviderSvc_test OK ***" <<endl;
......
......@@ -90,7 +90,7 @@ namespace Athena_test
cerr << "Now we expect to see an error message:" << endl \
<< "----Error Message Starts--->>" << endl;
DataLink<int> badI((int*)0);
DataLink<int> badI((int*)nullptr);
cerr << "<<----Error Message Ends-----" << endl;
assert(!badI.isValid());
......
......@@ -110,7 +110,7 @@ struct Lockable
: public ILockable
{
Lockable() : m_locked (false) {}
virtual void lock() { m_locked = true; }
void lock() override { m_locked = true; }
bool m_locked;
};
CLASS_DEF(Lockable, 82734636, 1)
......@@ -137,7 +137,7 @@ class XCopyConversion
: public SG::CopyConversion<X, Y>
{
public:
void convert (const X& src, Y& dst) const
void convert (const X& src, Y& dst) const override
{
dst.a = src.a+10;
dst.b = src.a+20;
......@@ -162,15 +162,15 @@ void test_DVL_conversions1 (StoreGateSvc& sg)
assert (sg.record (contd, "contd").isSuccess());
CONTC* contc = 0;
CONTC* contc = nullptr;
assert (sg.retrieve (contc, "contd").isSuccess());
assert (contc == contd);
CONTB* contb = 0;
CONTB* contb = nullptr;
assert (sg.retrieve (contb, "contd").isSuccess());
assert (contb == contd);
CONTA* conta = 0;
CONTA* conta = nullptr;
assert (sg.symLink (contd, conta).isSuccess());
assert (sg.retrieve (conta, "contd").isSuccess());
assert (conta->size() == 10);
......@@ -218,12 +218,12 @@ void test_const_DVL1 (StoreGateSvc& sg)
// This should give an error.
{
DVL* dvl0 = 0;
DVL* dvl0 = nullptr;
assert (sg.retrieve (dvl0, "dvl").isFailure());
}
// But this shold work.
const DVL* dvl1 = 0;
const DVL* dvl1 = nullptr;
assert (sg.retrieve (dvl1, "dvl").isSuccess());
ConstContainer* cdvl2 = new ConstContainer (SG::VIEW_ELEMENTS);
......@@ -237,7 +237,7 @@ void test_const_DVL1 (StoreGateSvc& sg)
cdvl2->push_back (*it);
}
const DVL* dvl2 = 0;
const DVL* dvl2 = nullptr;
assert (sg.retrieve (dvl2, "dvl2").isSuccess());
i = 0;
for (typename DVL::const_iterator it = dvl2->begin();
......@@ -264,18 +264,18 @@ void test_copy_conversions (StoreGateSvc& sg)
x->a = 10;
assert (sg.record (x, "x").isSuccess());
Athena_test::Y* y = 0;
Athena_test::Y* y = nullptr;
assert (sg.retrieve (y, "x").isFailure());
assert (sg.setConst (x).isSuccess());
const Athena_test::Y* cy = 0;
const Athena_test::Y* cy = nullptr;
assert (sg.retrieve (cy, "x").isSuccess());
assert ((char*)cy != (char*)x);
assert (cy->a == 20);
assert (cy->b == 30);
const Athena_test::A* ca = 0;
const Athena_test::A* ca = nullptr;
assert (sg.retrieve (ca, "x").isFailure());
}
......@@ -304,7 +304,7 @@ int main() {
}
assert(pSvcLoc);
StoreGateSvc* pStore(0);
StoreGateSvc* pStore(nullptr);
static const bool CREATE(true);
assert((pSvcLoc->service("StoreGateSvc", pStore, CREATE)).isSuccess());
assert(pStore);
......@@ -358,7 +358,7 @@ int main() {
///////
StoreGateSvc* detStore(0);
StoreGateSvc* detStore(nullptr);
assert((pSvcLoc->service("DetectorStore", detStore, CREATE)).isSuccess());
assert(detStore);
......
......@@ -8,7 +8,7 @@
ATLAS Collaboration
***************************************************************************/
// $Id: StoreID_test.cxx 753911 2016-06-09 13:40:32Z calaf $
// $Id: StoreID_test.cxx 770224 2016-08-26 01:59:31Z ssnyder $
#include <iostream>
......@@ -32,7 +32,7 @@ int main() {
}
assert(pSvcLoc);
StoreGateSvc* pStore(0);
StoreGateSvc* pStore(nullptr);
static const bool CREATE(true);
assert((pSvcLoc->service("StoreGateSvc", pStore, CREATE)).isSuccess());
assert(pStore);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment