Skip to content
Snippets Groups Projects
Commit 3ef06146 authored by Kasper Marstal's avatar Kasper Marstal
Browse files

BUG: Fix negate ComponentExist

parent 2f66846b
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ bool
Blueprint
::ComponentExist( ComponentIndexType index )
{
return boost::vertex( index, this->m_Graph ) == boost::graph_traits< GraphType >::null_vertex();
return boost::vertex( index, this->m_Graph ) != boost::graph_traits< GraphType >::null_vertex();
}
......
......@@ -2,8 +2,6 @@
#include "gtest/gtest.h"
#include "itkImage.h"
namespace elx {
class BlueprintTest : public ::testing::Test {
......@@ -41,6 +39,7 @@ TEST_F( BlueprintTest, Get )
{
BlueprintPointerType blueprint = Blueprint::New();
ComponentIndexType index = blueprint->AddComponent( parameterMap );
EXPECT_EQ( Blueprint::ComponentIndexType(0), index );
ParameterMapType parameterMapTest;
EXPECT_NO_THROW( parameterMapTest = blueprint->GetComponent( index ) );
......@@ -57,7 +56,7 @@ TEST_F( BlueprintTest, Delete )
EXPECT_EQ( parameterMap["ComponentName"], parameterMapTest["ComponentName"] );
EXPECT_NO_THROW( blueprint->DeleteComponent( index ) );
parameterMapTest = blueprint->GetComponent( index );
EXPECT_ANY_THROW( parameterMapTest = blueprint->GetComponent( index ) );
}
} // namespace elx
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