// Basic tests (data and init). void normalTests(){ m_thisObject->setName("myname") ; EXPECT_TRUE(m_thisObject->getName() == "myname") ; EXPECT_TRUE( m_thisObject->findData("indices") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("vecId") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("average") != NULL ) ; EXPECT_NO_THROW( m_thisObject->init() ) ; EXPECT_NO_THROW( m_thisObject->bwdInit() ) ; EXPECT_NO_THROW( m_thisObject->reinit() ) ; EXPECT_NO_THROW( m_thisObject->reset() ) ; this->mstate = NULL; EXPECT_NO_THROW(this->update()) ; return ; }
// Basic tests (data and init). void normalTests(){ m_thisObject->setName("myname") ; EXPECT_TRUE(m_thisObject->getName() == "myname") ; EXPECT_TRUE( m_thisObject->findData("input_position") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("output_position") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("triangles") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("quads") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("normal") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("thickness") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("distance") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("minThickness") != NULL ) ; EXPECT_NO_THROW( m_thisObject->init() ) ; EXPECT_NO_THROW( m_thisObject->bwdInit() ) ; EXPECT_NO_THROW( m_thisObject->reinit() ) ; EXPECT_NO_THROW( m_thisObject->reset() ) ; EXPECT_NO_THROW(this->update()) ; return ; }
/// It is important to freeze what are the available Data field /// of a component and rise warning/errors when some one removed. void attributesTests() { m_thisObject->setName("myname") ; EXPECT_TRUE(m_thisObject->getName() == "myname") ; // List of the supported attributes the user expect to find // This list needs to be updated if you add an attribute. vector<string> attrnames = { "plane", "position", "edges", "triangles", "tetrahedra", "computeEdges", "computeTriangles", "computeTetrahedra", "indices", "edgeIndices", "triangleIndices", "tetrahedronIndices", "pointsInROI", "edgesInROI", "trianglesInROI", "tetrahedraInROI", "drawBoxes", "drawPoints", "drawEdges", "drawTriangles", "drawTetrahedra", "drawSize" }; for(auto& attrname : attrnames) EXPECT_NE( m_thisObject->findData(attrname), nullptr ) << "Missing attribute with name '" << attrname << "'." ; return ; }
// Basic tests (data and init). void normalTests(){ m_thisObject->setName("myname") ; EXPECT_TRUE(m_thisObject->getName() == "myname") ; EXPECT_TRUE( m_thisObject->findData("position") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("nbSet") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("indices") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("pointsInROI") != NULL ) ; EXPECT_NO_THROW( m_thisObject->init() ) ; EXPECT_NO_THROW( m_thisObject->bwdInit() ) ; EXPECT_NO_THROW( m_thisObject->reinit() ) ; EXPECT_NO_THROW( m_thisObject->reset() ) ; m_thisObject->findData("nbSet")->read("3"); m_thisObject->init(); EXPECT_TRUE( m_thisObject->findData("setIndices1") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("setIndices2") != NULL ) ; EXPECT_TRUE( m_thisObject->findData("setIndices3") != NULL ) ; return ; }