mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improved unit test so they run correctly in debug
This commit is contained in:
@@ -58,7 +58,8 @@ class ContainerObj : public caf::PdmObjectHandle
|
||||
public:
|
||||
ContainerObj() : PdmObjectHandle()
|
||||
{
|
||||
this->addField(&derivedObjs, "derivedObjs");
|
||||
this->addField(&derivedObjs, "derivedObjs");
|
||||
this->addField(&derivedOtherObjs, "derivedOtherObjs");
|
||||
}
|
||||
|
||||
~ContainerObj()
|
||||
|
||||
@@ -209,10 +209,15 @@ TEST(BaseTest, TestPdmValueFieldInterface)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST(BaseTest, NormalPdmField)
|
||||
{
|
||||
class A
|
||||
class A : public caf::PdmObjectHandle
|
||||
{
|
||||
public:
|
||||
A(const std::vector<double>& testValue) : field2(testValue), field3(field2) {}
|
||||
A(const std::vector<double>& testValue) : field2(testValue), field3(field2)
|
||||
{
|
||||
this->addField(&field1, "field1");
|
||||
this->addField(&field2, "field2");
|
||||
this->addField(&field3, "field3");
|
||||
}
|
||||
|
||||
caf::PdmDataValueField<std::vector<double> > field1;
|
||||
caf::PdmDataValueField<std::vector<double> > field2;
|
||||
@@ -432,9 +437,13 @@ TEST(BaseTest, PdmChildArrayFieldHandle)
|
||||
|
||||
TEST(BaseTest, PdmChildField)
|
||||
{
|
||||
class A {
|
||||
class A : public caf::PdmObjectHandle
|
||||
{
|
||||
public:
|
||||
A(Child* a) :field2(a) {}
|
||||
A(Child* a) :field2(a)
|
||||
{
|
||||
this->addField(&field2, "field2");
|
||||
}
|
||||
|
||||
~A()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user