diff --git a/files/agents.owl b/files/agents.owl new file mode 100644 index 00000000..2cf6d1d6 --- /dev/null +++ b/files/agents.owl @@ -0,0 +1,269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + an agent is an animated entity + agent + + + + + + + + + bras + + + + + + + + + + enfant + + + + + + + + + pied + + + + + + + + + main + + + + + + + + + tête + + + + + + + + + + + + 2 + humain + + + + + + + + + + joints are parts of agent + jointure + + + + + + + + + jambe + + + + + + + + + + + 0 + homme + + + + + + + + + + + + + + + + + + + + + + + + + + + robot + + + + + + + + + torse + + + + + + + + + + femme + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/files/attribute.owl b/files/attribute.owl index 6010dcb9..0f6da65f 100644 --- a/files/attribute.owl +++ b/files/attribute.owl @@ -78,17 +78,6 @@ - - - - - - an agent is an animated entity - agent - - - - @@ -108,15 +97,6 @@ - - - - - bras - - - - @@ -179,16 +159,6 @@ - - - - - - enfant - - - - @@ -262,15 +232,6 @@ - - - - - pied - - - - @@ -312,37 +273,6 @@ - - - - - main - - - - - - - - - tête - - - - - - - - - - - - 2 - humain - - - - @@ -363,17 +293,6 @@ - - - - - - joints are parts of agent - jointure - - - - @@ -384,15 +303,6 @@ - - - - - jambe - - - - @@ -422,18 +332,6 @@ - - - - - - - 0 - homme - - - - @@ -484,15 +382,6 @@ - - - - - - - - - @@ -502,14 +391,6 @@ - - - - - - - - @@ -540,16 +421,6 @@ - - - - - - robot - - - - @@ -618,15 +489,6 @@ furniture - - - - - torse - - - - @@ -668,16 +530,6 @@ furniture - - - - - - femme - - - - @@ -719,33 +571,6 @@ furniture - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/files/color.owl b/files/color.owl index 35f4769a..f93963a1 100644 --- a/files/color.owl +++ b/files/color.owl @@ -25,9 +25,9 @@ - + - + black musta @@ -36,9 +36,9 @@ - + - + bleu blue @@ -58,9 +58,9 @@ - + - + vert vihreä @@ -68,9 +68,9 @@ - + - + pinkki rose @@ -78,9 +78,9 @@ - + - + violet violetti @@ -88,9 +88,9 @@ - + - + punainen rouge @@ -98,9 +98,9 @@ - + - + blanc valkoinen @@ -108,9 +108,9 @@ - + - + jaune keltainen diff --git a/files/positionProperty.owl b/files/positionProperty.owl index 3d97ded0..fa2c1236 100644 --- a/files/positionProperty.owl +++ b/files/positionProperty.owl @@ -219,34 +219,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 236 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cube rouge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/files/test_individuals.owl b/files/test_individuals.owl new file mode 100644 index 00000000..6e35b381 --- /dev/null +++ b/files/test_individuals.owl @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 236 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cube rouge + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/launch/ontologenius.launch b/launch/ontologenius.launch index 90ca6fa1..01862f0e 100644 --- a/launch/ontologenius.launch +++ b/launch/ontologenius.launch @@ -7,7 +7,7 @@ $(find ontologenius)/files/attribute.owl $(find ontologenius)/files/animals.owl $(find ontologenius)/files/positionProperty.owl - $(find ontologenius)/files/testIndividuals.owl + $(find ontologenius)/files/test_individuals.owl "/> diff --git a/launch/ontologenius_full.launch b/launch/ontologenius_full.launch index fc19070a..df71ed2b 100644 --- a/launch/ontologenius_full.launch +++ b/launch/ontologenius_full.launch @@ -7,7 +7,7 @@ $(find ontologenius)/files/attribute.owl $(find ontologenius)/files/animals.owl $(find ontologenius)/files/positionProperty.owl - $(find ontologenius)/files/testIndividuals.owl + $(find ontologenius)/files/test_individuals.owl "/> diff --git a/launch/ontologenius_multi.launch b/launch/ontologenius_multi.launch index f95a3a26..3b18e73d 100644 --- a/launch/ontologenius_multi.launch +++ b/launch/ontologenius_multi.launch @@ -9,7 +9,7 @@ $(find ontologenius)/files/attribute.owl $(find ontologenius)/files/animals.owl $(find ontologenius)/files/positionProperty.owl - $(find ontologenius)/files/testIndividuals.owl + $(find ontologenius)/files/test_individuals.owl "/> diff --git a/launch/ontologenius_multi_full.launch b/launch/ontologenius_multi_full.launch index 8c2be3b3..9970bc80 100644 --- a/launch/ontologenius_multi_full.launch +++ b/launch/ontologenius_multi_full.launch @@ -9,7 +9,7 @@ $(find ontologenius)/files/attribute.owl $(find ontologenius)/files/animals.owl $(find ontologenius)/files/positionProperty.owl - $(find ontologenius)/files/testIndividuals.owl + $(find ontologenius)/files/test_individuals.owl "/> diff --git a/launch/ontologenius_valgrind.launch b/launch/ontologenius_valgrind.launch index c2e81d9b..ceb7f314 100644 --- a/launch/ontologenius_valgrind.launch +++ b/launch/ontologenius_valgrind.launch @@ -5,7 +5,7 @@ $(find ontologenius)/files/attribute.owl $(find ontologenius)/files/animals.owl $(find ontologenius)/files/positionProperty.owl - $(find ontologenius)/files/testIndividuals.owl + $(find ontologenius)/files/test_individuals.owl "/> diff --git a/launch/ros2/launch/ontologenius.py b/launch/ros2/launch/ontologenius.py index 36f167a5..20d85082 100644 --- a/launch/ros2/launch/ontologenius.py +++ b/launch/ros2/launch/ontologenius.py @@ -32,7 +32,7 @@ def generate_launch_description(): "files", default_value=TextSubstitution(text = os.path.join(get_package_share_directory('ontologenius'), "files/attribute.owl") + " " + os.path.join(get_package_share_directory('ontologenius'), "files/animals.owl") + " " + os.path.join(get_package_share_directory('ontologenius'), "files/positionProperty.owl") + " " + - os.path.join(get_package_share_directory('ontologenius'), "files/testIndividuals.owl")) + os.path.join(get_package_share_directory('ontologenius'), "files/test_individuals.owl")) ) tcmalloc_path_arg = DeclareLaunchArgument( "tcmalloc_path", default_value=TextSubstitution(text="") diff --git a/launch/ros2/launch/ontologenius.xml b/launch/ros2/launch/ontologenius.xml index 5fe8d790..504729e3 100644 --- a/launch/ros2/launch/ontologenius.xml +++ b/launch/ros2/launch/ontologenius.xml @@ -7,7 +7,7 @@ $(find-pkg-share ontologenius)/files/attribute.owl $(find-pkg-share ontologenius)/files/animals.owl $(find-pkg-share ontologenius)/files/positionProperty.owl - $(find-pkg-share ontologenius)/files/testIndividuals.owl + $(find-pkg-share ontologenius)/files/test_individuals.owl "/> diff --git a/launch/ros2/launch/ontologenius.yaml b/launch/ros2/launch/ontologenius.yaml index 26021bf0..afd26ea0 100644 --- a/launch/ros2/launch/ontologenius.yaml +++ b/launch/ros2/launch/ontologenius.yaml @@ -17,7 +17,7 @@ launch: $(find-pkg-share ontologenius)/files/attribute.owl $(find-pkg-share ontologenius)/files/animals.owl $(find-pkg-share ontologenius)/files/positionProperty.owl - $(find-pkg-share ontologenius)/files/testIndividuals.owl + $(find-pkg-share ontologenius)/files/test_individuals.owl " - arg: name: "tcmalloc_path" diff --git a/launch/ros2/launch/ontologenius_full.py b/launch/ros2/launch/ontologenius_full.py index 5ec0d2d4..9d1b9074 100644 --- a/launch/ros2/launch/ontologenius_full.py +++ b/launch/ros2/launch/ontologenius_full.py @@ -32,7 +32,7 @@ def generate_launch_description(): "files", default_value=TextSubstitution(text = os.path.join(get_package_share_directory('ontologenius'), "files/attribute.owl") + " " + os.path.join(get_package_share_directory('ontologenius'), "files/animals.owl") + " " + os.path.join(get_package_share_directory('ontologenius'), "files/positionProperty.owl") + " " + - os.path.join(get_package_share_directory('ontologenius'), "files/testIndividuals.owl")) + os.path.join(get_package_share_directory('ontologenius'), "files/test_individuals.owl")) ) tcmalloc_path_arg = DeclareLaunchArgument( "tcmalloc_path", default_value=TextSubstitution(text="") diff --git a/launch/ros2/launch/ontologenius_full.xml b/launch/ros2/launch/ontologenius_full.xml index 5514cccd..f43a0ffe 100644 --- a/launch/ros2/launch/ontologenius_full.xml +++ b/launch/ros2/launch/ontologenius_full.xml @@ -7,7 +7,7 @@ $(find-pkg-share ontologenius)/files/attribute.owl $(find-pkg-share ontologenius)/files/animals.owl $(find-pkg-share ontologenius)/files/positionProperty.owl - $(find-pkg-share ontologenius)/files/testIndividuals.owl + $(find-pkg-share ontologenius)/files/test_individuals.owl "/> diff --git a/launch/ros2/launch/ontologenius_full.yaml b/launch/ros2/launch/ontologenius_full.yaml index fc860c4a..f3f9cd7b 100644 --- a/launch/ros2/launch/ontologenius_full.yaml +++ b/launch/ros2/launch/ontologenius_full.yaml @@ -17,7 +17,7 @@ launch: $(find-pkg-share ontologenius)/files/attribute.owl $(find-pkg-share ontologenius)/files/animals.owl $(find-pkg-share ontologenius)/files/positionProperty.owl - $(find-pkg-share ontologenius)/files/testIndividuals.owl + $(find-pkg-share ontologenius)/files/test_individuals.owl " - arg: name: "tcmalloc_path" diff --git a/launch/ros2/launch/ontologenius_multi_full.py b/launch/ros2/launch/ontologenius_multi_full.py index 72de9dc6..d5caf3d6 100644 --- a/launch/ros2/launch/ontologenius_multi_full.py +++ b/launch/ros2/launch/ontologenius_multi_full.py @@ -32,7 +32,7 @@ def generate_launch_description(): "files", default_value=TextSubstitution(text = os.path.join(get_package_share_directory('ontologenius'), "files/attribute.owl") + " " + os.path.join(get_package_share_directory('ontologenius'), "files/animals.owl") + " " + os.path.join(get_package_share_directory('ontologenius'), "files/positionProperty.owl") + " " + - os.path.join(get_package_share_directory('ontologenius'), "files/testIndividuals.owl")) + os.path.join(get_package_share_directory('ontologenius'), "files/test_individuals.owl")) ) robot_file_arg = DeclareLaunchArgument( "robot_file", default_value=TextSubstitution(text="none") diff --git a/launch/ros2/launch/ontologenius_multi_full.xml b/launch/ros2/launch/ontologenius_multi_full.xml index e551650c..67607ba9 100644 --- a/launch/ros2/launch/ontologenius_multi_full.xml +++ b/launch/ros2/launch/ontologenius_multi_full.xml @@ -7,7 +7,7 @@ $(find-pkg-share ontologenius)/files/attribute.owl $(find-pkg-share ontologenius)/files/animals.owl $(find-pkg-share ontologenius)/files/positionProperty.owl - $(find-pkg-share ontologenius)/files/testIndividuals.owl + $(find-pkg-share ontologenius)/files/test_individuals.owl "/> diff --git a/launch/ros2/launch/ontologenius_multi_full.yaml b/launch/ros2/launch/ontologenius_multi_full.yaml index eaf14d0a..ee98c3ac 100644 --- a/launch/ros2/launch/ontologenius_multi_full.yaml +++ b/launch/ros2/launch/ontologenius_multi_full.yaml @@ -17,7 +17,7 @@ launch: $(find-pkg-share ontologenius)/files/attribute.owl $(find-pkg-share ontologenius)/files/animals.owl $(find-pkg-share ontologenius)/files/positionProperty.owl - $(find-pkg-share ontologenius)/files/testIndividuals.owl + $(find-pkg-share ontologenius)/files/test_individuals.owl " - arg: name: "robot_file" diff --git a/src/tests/CI/api_inheritage_test.cpp b/src/tests/CI/api_inheritage_test.cpp index d39edc27..b32d5177 100644 --- a/src/tests/CI/api_inheritage_test.cpp +++ b/src/tests/CI/api_inheritage_test.cpp @@ -12,7 +12,7 @@ onto::OntologyManipulator* onto_ptr; TEST(api_inheritage, getName_call) { - std::string res = onto_ptr->classes.getName("human"); + std::string res = onto_ptr->classes.getName("Human"); EXPECT_EQ(res, "human"); } @@ -20,19 +20,19 @@ TEST(api_inheritage, find_call) { std::vector res = onto_ptr->classes.find("human"); EXPECT_EQ(res.size(), 1); - EXPECT_EQ(res.front(), "human"); + EXPECT_EQ(res.front(), "Human"); } TEST(api_inheritage, getUp_call) { - std::vector res = onto_ptr->classes.getUp("human"); + std::vector res = onto_ptr->classes.getUp("Human"); EXPECT_EQ(res.size(), 8); bool res_bool = ((std::find(res.begin(), res.end(), "entity") != res.end()) && (std::find(res.begin(), res.end(), "animate") != res.end()) && (std::find(res.begin(), res.end(), "activity") != res.end()) && (std::find(res.begin(), res.end(), "attribute") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "agent") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Agent") != res.end()) && (std::find(res.begin(), res.end(), "vitality") != res.end()) && (std::find(res.begin(), res.end(), "living") != res.end())); EXPECT_TRUE(res_bool); @@ -40,42 +40,42 @@ TEST(api_inheritage, getUp_call) TEST(api_inheritage, getDown_call) { - std::vector res = onto_ptr->classes.getDown("human"); + std::vector res = onto_ptr->classes.getDown("Human"); EXPECT_EQ(res.size(), 4); - bool res_bool = ((std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "child") != res.end())); + bool res_bool = ((std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Child") != res.end())); EXPECT_TRUE(res_bool); } TEST(api_inheritage, getDisjoint_call) { - std::vector res = onto_ptr->classes.getDisjoint("woman"); + std::vector res = onto_ptr->classes.getDisjoint("Woman"); EXPECT_EQ(res.size(), 63); - bool res_bool = (std::find(res.begin(), res.end(), "man") != res.end()); + bool res_bool = (std::find(res.begin(), res.end(), "Man") != res.end()); EXPECT_TRUE(res_bool); } TEST(api_inheritage, depth_call) { - std::vector res = onto_ptr->classes.getUp("human", 1); + std::vector res = onto_ptr->classes.getUp("Human", 1); EXPECT_EQ(res.size(), 3); - bool res_bool = ((std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "agent") != res.end()) && + bool res_bool = ((std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Agent") != res.end()) && (std::find(res.begin(), res.end(), "living") != res.end())); EXPECT_TRUE(res_bool); } TEST(api_inheritage, select_true_call) { - EXPECT_TRUE(onto_ptr->classes.isA("human", "entity")); + EXPECT_TRUE(onto_ptr->classes.isA("Human", "entity")); } TEST(api_inheritage, select_false_call) { - EXPECT_FALSE(onto_ptr->classes.isA("human", "Animal")); + EXPECT_FALSE(onto_ptr->classes.isA("Human", "Animal")); } int main(int argc, char** argv) diff --git a/src/tests/CI/api_relations_index_test.cpp b/src/tests/CI/api_relations_index_test.cpp index 96e29489..858bcc8b 100644 --- a/src/tests/CI/api_relations_index_test.cpp +++ b/src/tests/CI/api_relations_index_test.cpp @@ -12,7 +12,7 @@ onto::OntologyManipulatorIndex* onto_ptr; TEST(api_relations_index, class_getRelationFrom) { std::vector res; - int64_t test_word = onto_ptr->conversion.classesId2Index("human"); + int64_t test_word = onto_ptr->conversion.classesId2Index("Human"); bool res_bool = true; res = onto_ptr->classes.getRelationFrom(test_word); @@ -23,7 +23,7 @@ TEST(api_relations_index, class_getRelationFrom) (std::find(res.begin(), res.end(), onto_ptr->conversion.objectPropertiesId2Index("hasParent")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); res = onto_ptr->classes.getRelationFrom(test_word); EXPECT_EQ(res.size(), 4); res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.objectPropertiesId2Index("hasFather")) != res.end()) && @@ -45,28 +45,28 @@ TEST(api_relations_index, class_getRelatedFrom) res = onto_ptr->classes.getRelatedFrom(test_word); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("child")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("human")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Child")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Human")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.objectPropertiesId2Index("hasParent"); res = onto_ptr->classes.getRelatedFrom(test_word); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("child")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("human")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Child")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Human")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.objectPropertiesId2Index("hasMother"); res = onto_ptr->classes.getRelatedFrom(test_word); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("child")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("human")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Child")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Human")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.objectPropertiesId2Index("isOn"); @@ -77,7 +77,7 @@ TEST(api_relations_index, class_getRelatedFrom) TEST(api_relations_index, class_getRelationOn) { std::vector res; - int64_t test_word = onto_ptr->conversion.classesId2Index("woman"); + int64_t test_word = onto_ptr->conversion.classesId2Index("Woman"); bool res_bool = true; res = onto_ptr->classes.getRelationOn(test_word); @@ -98,7 +98,7 @@ TEST(api_relations_index, class_getRelationOn) res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.dataPropertiesId2Index("hasLeg")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("human"); + test_word = onto_ptr->conversion.classesId2Index("Human"); res = onto_ptr->classes.getRelationOn(test_word); EXPECT_TRUE(res.empty()); } @@ -118,20 +118,20 @@ TEST(api_relations_index, class_getRelatedOn) test_word = onto_ptr->conversion.objectPropertiesId2Index("hasMother"); res = onto_ptr->classes.getRelatedOn(test_word); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end()); + res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end()); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.objectPropertiesId2Index("hasFather"); res = onto_ptr->classes.getRelatedOn(test_word); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()); + res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.objectPropertiesId2Index("hasParent"); res = onto_ptr->classes.getRelatedOn(test_word); EXPECT_EQ(res.size(), 2); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.objectPropertiesId2Index("isOn"); @@ -142,30 +142,30 @@ TEST(api_relations_index, class_getRelatedOn) TEST(api_relations_index, class_getRelationWith) { std::vector res; - int64_t test_word = onto_ptr->conversion.classesId2Index("human"); + int64_t test_word = onto_ptr->conversion.classesId2Index("Human"); bool res_bool = true; res = onto_ptr->classes.getRelationWith(test_word); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.literalsId2Index("integer#2")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("child"); + test_word = onto_ptr->conversion.classesId2Index("Child"); res = onto_ptr->classes.getRelationWith(test_word); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.literalsId2Index("integer#2")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); res = onto_ptr->classes.getRelationWith(test_word); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.literalsId2Index("integer#0")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.classesId2Index("cube"); @@ -176,41 +176,41 @@ TEST(api_relations_index, class_getRelationWith) TEST(api_relations_index, class_getRelatedWith) { std::vector res; - int64_t test_word = onto_ptr->conversion.classesId2Index("woman"); + int64_t test_word = onto_ptr->conversion.classesId2Index("Woman"); bool res_bool = true; res = onto_ptr->classes.getRelatedWith(test_word); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("child")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("human")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Child")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Human")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); res = onto_ptr->classes.getRelatedWith(test_word); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("child")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("human")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Child")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Human")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.literalsId2Index("integer#2"); res = onto_ptr->classes.getRelatedWith(test_word); EXPECT_EQ(res.size(), 3); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("child")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("human")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Child")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Human")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.literalsId2Index("integer#0"); res = onto_ptr->classes.getRelatedWith(test_word); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()); + res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("human"); + test_word = onto_ptr->conversion.classesId2Index("Human"); res = onto_ptr->classes.getRelatedWith(test_word); EXPECT_TRUE(res.empty()); } @@ -218,45 +218,45 @@ TEST(api_relations_index, class_getRelatedWith) TEST(api_relations_index, class_getFrom) { std::vector res; - int64_t test_word = onto_ptr->conversion.classesId2Index("woman"); + int64_t test_word = onto_ptr->conversion.classesId2Index("Woman"); int64_t test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasMother"); bool res_bool = true; res = onto_ptr->classes.getFrom(test_word2, test_word); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("child")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("human")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Child")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Human")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("woman"); + test_word = onto_ptr->conversion.classesId2Index("Woman"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasParent"); res = onto_ptr->classes.getFrom(test_word2, test_word); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("child")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("human")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Child")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Human")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.literalsId2Index("integer#2"); test_word2 = onto_ptr->conversion.dataPropertiesId2Index("hasLeg"); res = onto_ptr->classes.getFrom(test_word2, test_word); EXPECT_EQ(res.size(), 3); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("child")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("human")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Child")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Human")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.literalsId2Index("integer#0"); test_word2 = onto_ptr->conversion.dataPropertiesId2Index("hasLeg"); res = onto_ptr->classes.getFrom(test_word2, test_word); EXPECT_EQ(res.size(), 1); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasMother"); res = onto_ptr->classes.getFrom(test_word2, test_word); EXPECT_TRUE(res.empty()); @@ -265,7 +265,7 @@ TEST(api_relations_index, class_getFrom) TEST(api_relations_index, class_getOn) { std::vector res; - int64_t test_word = onto_ptr->conversion.classesId2Index("man"); + int64_t test_word = onto_ptr->conversion.classesId2Index("Man"); int64_t test_word2 = onto_ptr->conversion.dataPropertiesId2Index("hasLeg"); bool res_bool = true; @@ -274,33 +274,33 @@ TEST(api_relations_index, class_getOn) res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.literalsId2Index("integer#0")) != res.end()); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("child"); + test_word = onto_ptr->conversion.classesId2Index("Child"); test_word2 = onto_ptr->conversion.dataPropertiesId2Index("hasLeg"); res = onto_ptr->classes.getOn(test_word, test_word2); EXPECT_EQ(res.size(), 1); res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.literalsId2Index("integer#2")) != res.end()); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("woman"); + test_word = onto_ptr->conversion.classesId2Index("Woman"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasFather"); res = onto_ptr->classes.getOn(test_word, test_word2); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()); + res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("human"); + test_word = onto_ptr->conversion.classesId2Index("Human"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasMother"); res = onto_ptr->classes.getOn(test_word, test_word2); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end()); + res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end()); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("human"); + test_word = onto_ptr->conversion.classesId2Index("Human"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasParent"); res = onto_ptr->classes.getOn(test_word, test_word2); EXPECT_EQ(res.size(), 2); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.classesId2Index("cube"); @@ -312,8 +312,8 @@ TEST(api_relations_index, class_getOn) TEST(api_relations_index, class_getWith) { std::vector res; - int64_t test_word = onto_ptr->conversion.classesId2Index("human"); - int64_t test_word2 = onto_ptr->conversion.classesId2Index("man"); + int64_t test_word = onto_ptr->conversion.classesId2Index("Human"); + int64_t test_word2 = onto_ptr->conversion.classesId2Index("Man"); bool res_bool = true; res = onto_ptr->classes.getWith(test_word, test_word2); @@ -322,34 +322,34 @@ TEST(api_relations_index, class_getWith) (std::find(res.begin(), res.end(), onto_ptr->conversion.objectPropertiesId2Index("hasParent")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); - test_word2 = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); + test_word2 = onto_ptr->conversion.classesId2Index("Man"); res = onto_ptr->classes.getWith(test_word, test_word2); EXPECT_EQ(res.size(), 2); res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.objectPropertiesId2Index("hasFather")) != res.end()) && (std::find(res.begin(), res.end(), onto_ptr->conversion.objectPropertiesId2Index("hasParent")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("child"); + test_word = onto_ptr->conversion.classesId2Index("Child"); test_word2 = onto_ptr->conversion.literalsId2Index("integer#2"); res = onto_ptr->classes.getWith(test_word, test_word2); EXPECT_EQ(res.size(), 1); res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.dataPropertiesId2Index("hasLeg")) != res.end()); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); test_word2 = onto_ptr->conversion.literalsId2Index("integer#0"); res = onto_ptr->classes.getWith(test_word, test_word2); EXPECT_EQ(res.size(), 1); res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.dataPropertiesId2Index("hasLeg")) != res.end()); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("human"); - test_word2 = onto_ptr->conversion.classesId2Index("human"); + test_word = onto_ptr->conversion.classesId2Index("Human"); + test_word2 = onto_ptr->conversion.classesId2Index("Human"); res = onto_ptr->classes.getWith(test_word, test_word2); EXPECT_TRUE(res.empty()); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); test_word2 = onto_ptr->conversion.literalsId2Index("integer#2"); res = onto_ptr->classes.getWith(test_word, test_word2); EXPECT_TRUE(res.empty()); @@ -394,7 +394,7 @@ TEST(api_relations_index, individual_getRelationFrom) (std::find(res.begin(), res.end(), onto_ptr->conversion.dataPropertiesId2Index("have3Dposition")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); res = onto_ptr->individuals.getRelationFrom(test_word); EXPECT_TRUE(res.empty()); } @@ -429,7 +429,7 @@ TEST(api_relations_index, individual_getRelatedFrom) (std::find(res.begin(), res.end(), onto_ptr->conversion.individualsId2Index("blue_cube")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("human"); + test_word = onto_ptr->conversion.classesId2Index("Human"); res = onto_ptr->individuals.getRelatedFrom(test_word); EXPECT_TRUE(res.empty()); } @@ -465,7 +465,7 @@ TEST(api_relations_index, individual_getRelationOn) res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.dataPropertiesId2Index("hasLeg")) != res.end()); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("human"); + test_word = onto_ptr->conversion.classesId2Index("Human"); res = onto_ptr->individuals.getRelationOn(test_word); EXPECT_TRUE(res.empty()); } @@ -517,8 +517,8 @@ TEST(api_relations_index, individual_getRelationWith) res = onto_ptr->individuals.getRelationWith(test_word); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.literalsId2Index("integer#2")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.individualsId2Index("kevin"); @@ -533,8 +533,8 @@ TEST(api_relations_index, individual_getRelationWith) res = onto_ptr->individuals.getRelationWith(test_word); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.literalsId2Index("integer#0")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end())); + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.individualsId2Index("cube1"); @@ -550,7 +550,7 @@ TEST(api_relations_index, individual_getRelationWith) TEST(api_relations_index, individual_getRelatedWith) { std::vector res; - int64_t test_word = onto_ptr->conversion.classesId2Index("woman"); + int64_t test_word = onto_ptr->conversion.classesId2Index("Woman"); bool res_bool = true; res = onto_ptr->individuals.getRelatedWith(test_word); @@ -560,7 +560,7 @@ TEST(api_relations_index, individual_getRelatedWith) (std::find(res.begin(), res.end(), onto_ptr->conversion.individualsId2Index("bob")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); res = onto_ptr->individuals.getRelatedWith(test_word); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.individualsId2Index("kevin")) != res.end()) && @@ -581,7 +581,7 @@ TEST(api_relations_index, individual_getRelatedWith) (std::find(res.begin(), res.end(), onto_ptr->conversion.individualsId2Index("bob")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("human"); + test_word = onto_ptr->conversion.classesId2Index("Human"); res = onto_ptr->individuals.getRelatedWith(test_word); EXPECT_TRUE(res.empty()); } @@ -589,7 +589,7 @@ TEST(api_relations_index, individual_getRelatedWith) TEST(api_relations_index, individual_getFrom) { std::vector res; - int64_t test_word = onto_ptr->conversion.classesId2Index("woman"); + int64_t test_word = onto_ptr->conversion.classesId2Index("Woman"); int64_t test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasMother"); bool res_bool = true; @@ -600,7 +600,7 @@ TEST(api_relations_index, individual_getFrom) (std::find(res.begin(), res.end(), onto_ptr->conversion.individualsId2Index("bob")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("woman"); + test_word = onto_ptr->conversion.classesId2Index("Woman"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasParent"); res = onto_ptr->individuals.getFrom(test_word2, test_word); EXPECT_EQ(res.size(), 3); @@ -609,7 +609,7 @@ TEST(api_relations_index, individual_getFrom) (std::find(res.begin(), res.end(), onto_ptr->conversion.individualsId2Index("bob")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("human"); + test_word = onto_ptr->conversion.classesId2Index("Human"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasParent"); res = onto_ptr->individuals.getFrom(test_word2, test_word); EXPECT_EQ(res.size(), 3); @@ -633,7 +633,7 @@ TEST(api_relations_index, individual_getFrom) res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.individualsId2Index("alice")) != res.end()); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasMother"); res = onto_ptr->individuals.getFrom(test_word2, test_word); EXPECT_TRUE(res.empty()); @@ -662,22 +662,22 @@ TEST(api_relations_index, individual_getOn) test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasFather"); res = onto_ptr->individuals.getOn(test_word, test_word2); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end()); + res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end()); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.individualsId2Index("bob"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasMother"); res = onto_ptr->individuals.getOn(test_word, test_word2); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end()); + res_bool = (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end()); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.individualsId2Index("alice"); test_word2 = onto_ptr->conversion.objectPropertiesId2Index("hasParent"); res = onto_ptr->individuals.getOn(test_word, test_word2); EXPECT_EQ(res.size(), 2); - res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("woman")) != res.end()) && - (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("man")) != res.end())); + res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Woman")) != res.end()) && + (std::find(res.begin(), res.end(), onto_ptr->conversion.classesId2Index("Man")) != res.end())); EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.individualsId2Index("kevin"); @@ -688,7 +688,7 @@ TEST(api_relations_index, individual_getOn) (std::find(res.begin(), res.end(), onto_ptr->conversion.individualsId2Index("bob")) != res.end())); EXPECT_TRUE(res_bool); - test_word = onto_ptr->conversion.classesId2Index("man"); + test_word = onto_ptr->conversion.classesId2Index("Man"); test_word2 = onto_ptr->conversion.dataPropertiesId2Index("hasLeg"); res = onto_ptr->individuals.getOn(test_word, test_word2); EXPECT_TRUE(res.empty()); @@ -708,7 +708,7 @@ TEST(api_relations_index, individual_getWith) EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.individualsId2Index("bob"); - test_word2 = onto_ptr->conversion.classesId2Index("man"); + test_word2 = onto_ptr->conversion.classesId2Index("Man"); res = onto_ptr->individuals.getWith(test_word, test_word2); EXPECT_EQ(res.size(), 2); res_bool = ((std::find(res.begin(), res.end(), onto_ptr->conversion.objectPropertiesId2Index("hasFather")) != res.end()) && @@ -730,7 +730,7 @@ TEST(api_relations_index, individual_getWith) EXPECT_TRUE(res_bool); test_word = onto_ptr->conversion.individualsId2Index("alice"); - test_word2 = onto_ptr->conversion.classesId2Index("human"); + test_word2 = onto_ptr->conversion.classesId2Index("Human"); res = onto_ptr->individuals.getWith(test_word, test_word2); EXPECT_TRUE(res.empty()); diff --git a/src/tests/CI/api_relations_test.cpp b/src/tests/CI/api_relations_test.cpp index e915cd76..7bcb8e24 100644 --- a/src/tests/CI/api_relations_test.cpp +++ b/src/tests/CI/api_relations_test.cpp @@ -14,7 +14,7 @@ TEST(api_relations, class_getRelationFrom) std::vector res; bool res_bool = true; - res = onto_ptr->classes.getRelationFrom("human"); + res = onto_ptr->classes.getRelationFrom("Human"); EXPECT_EQ(res.size(), 4); res_bool = ((std::find(res.begin(), res.end(), "hasFather") != res.end()) && (std::find(res.begin(), res.end(), "hasMother") != res.end()) && @@ -22,7 +22,7 @@ TEST(api_relations, class_getRelationFrom) (std::find(res.begin(), res.end(), "hasParent") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getRelationFrom("man"); + res = onto_ptr->classes.getRelationFrom("Man"); EXPECT_EQ(res.size(), 4); res_bool = ((std::find(res.begin(), res.end(), "hasFather") != res.end()) && (std::find(res.begin(), res.end(), "hasMother") != res.end()) && @@ -41,26 +41,26 @@ TEST(api_relations, class_getRelatedFrom) res = onto_ptr->classes.getRelatedFrom("hasLeg"); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), "child") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Child") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getRelatedFrom("hasParent"); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), "child") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Child") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getRelatedFrom("hasMother"); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), "child") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Child") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getRelatedFrom("isOn"); @@ -72,7 +72,7 @@ TEST(api_relations, class_getRelationOn) std::vector res; bool res_bool = true; - res = onto_ptr->classes.getRelationOn("woman"); + res = onto_ptr->classes.getRelationOn("Woman"); EXPECT_EQ(res.size(), 2); res_bool = ((std::find(res.begin(), res.end(), "hasMother") != res.end()) && (std::find(res.begin(), res.end(), "hasParent") != res.end())); @@ -88,7 +88,7 @@ TEST(api_relations, class_getRelationOn) res_bool = (std::find(res.begin(), res.end(), "hasLeg") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getRelationOn("human"); + res = onto_ptr->classes.getRelationOn("Human"); EXPECT_TRUE(res.empty()); } @@ -105,18 +105,18 @@ TEST(api_relations, class_getRelatedOn) res = onto_ptr->classes.getRelatedOn("hasMother"); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), "woman") != res.end()); + res_bool = (std::find(res.begin(), res.end(), "Woman") != res.end()); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getRelatedOn("hasFather"); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), "man") != res.end()); + res_bool = (std::find(res.begin(), res.end(), "Man") != res.end()); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getRelatedOn("hasParent"); EXPECT_EQ(res.size(), 2); - res_bool = ((std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getRelatedOn("isOn"); @@ -128,25 +128,25 @@ TEST(api_relations, class_getRelationWith) std::vector res; bool res_bool = true; - res = onto_ptr->classes.getRelationWith("human"); + res = onto_ptr->classes.getRelationWith("Human"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "integer#2") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getRelationWith("child"); + res = onto_ptr->classes.getRelationWith("Child"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "integer#2") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getRelationWith("man"); + res = onto_ptr->classes.getRelationWith("Man"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "integer#0") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getRelationWith("cube"); @@ -158,35 +158,35 @@ TEST(api_relations, class_getRelatedWith) std::vector res; bool res_bool = true; - res = onto_ptr->classes.getRelatedWith("woman"); + res = onto_ptr->classes.getRelatedWith("Woman"); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), "child") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Child") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getRelatedWith("man"); + res = onto_ptr->classes.getRelatedWith("Man"); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), "child") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Child") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getRelatedWith("integer#2"); EXPECT_EQ(res.size(), 3); - res_bool = ((std::find(res.begin(), res.end(), "child") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Child") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getRelatedWith("integer#0"); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), "man") != res.end()); + res_bool = (std::find(res.begin(), res.end(), "Man") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getRelatedWith("human"); + res = onto_ptr->classes.getRelatedWith("Human"); EXPECT_TRUE(res.empty()); } @@ -195,35 +195,35 @@ TEST(api_relations, class_getFrom) std::vector res; bool res_bool = true; - res = onto_ptr->classes.getFrom("hasMother", "woman"); + res = onto_ptr->classes.getFrom("hasMother", "Woman"); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), "child") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Child") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getFrom("hasParent", "woman"); + res = onto_ptr->classes.getFrom("hasParent", "Woman"); EXPECT_EQ(res.size(), 4); - res_bool = ((std::find(res.begin(), res.end(), "child") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Child") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getFrom("hasLeg", "integer#2"); EXPECT_EQ(res.size(), 3); - res_bool = ((std::find(res.begin(), res.end(), "child") != res.end()) && - (std::find(res.begin(), res.end(), "human") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Child") != res.end()) && + (std::find(res.begin(), res.end(), "Human") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getFrom("hasLeg", "integer#0"); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), "man") != res.end()); + res_bool = (std::find(res.begin(), res.end(), "Man") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getFrom("hasMother", "man"); + res = onto_ptr->classes.getFrom("hasMother", "Man"); res_bool = (res.empty()); EXPECT_TRUE(res_bool); } @@ -233,30 +233,30 @@ TEST(api_relations, class_getOn) std::vector res; bool res_bool = true; - res = onto_ptr->classes.getOn("man", "hasLeg"); + res = onto_ptr->classes.getOn("Man", "hasLeg"); EXPECT_EQ(res.size(), 1); res_bool = (std::find(res.begin(), res.end(), "integer#0") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getOn("child", "hasLeg"); + res = onto_ptr->classes.getOn("Child", "hasLeg"); EXPECT_EQ(res.size(), 1); res_bool = (std::find(res.begin(), res.end(), "integer#2") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getOn("woman", "hasFather"); + res = onto_ptr->classes.getOn("Woman", "hasFather"); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), "man") != res.end()); + res_bool = (std::find(res.begin(), res.end(), "Man") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getOn("human", "hasMother"); + res = onto_ptr->classes.getOn("Human", "hasMother"); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), "woman") != res.end()); + res_bool = (std::find(res.begin(), res.end(), "Woman") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getOn("human", "hasParent"); + res = onto_ptr->classes.getOn("Human", "hasParent"); EXPECT_EQ(res.size(), 2); - res_bool = ((std::find(res.begin(), res.end(), "woman") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Woman") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->classes.getOn("cube", "isOn"); @@ -268,32 +268,32 @@ TEST(api_relations, class_getWith) std::vector res; bool res_bool = true; - res = onto_ptr->classes.getWith("human", "man"); + res = onto_ptr->classes.getWith("Human", "Man"); EXPECT_EQ(res.size(), 2); res_bool = ((std::find(res.begin(), res.end(), "hasFather") != res.end()) && (std::find(res.begin(), res.end(), "hasParent") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getWith("man", "man"); + res = onto_ptr->classes.getWith("Man", "Man"); EXPECT_EQ(res.size(), 2); res_bool = ((std::find(res.begin(), res.end(), "hasFather") != res.end()) && (std::find(res.begin(), res.end(), "hasParent") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getWith("child", "integer#2"); + res = onto_ptr->classes.getWith("Child", "integer#2"); EXPECT_EQ(res.size(), 1); res_bool = (std::find(res.begin(), res.end(), "hasLeg") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getWith("man", "integer#0"); + res = onto_ptr->classes.getWith("Man", "integer#0"); EXPECT_EQ(res.size(), 1); res_bool = (std::find(res.begin(), res.end(), "hasLeg") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->classes.getWith("human", "human"); + res = onto_ptr->classes.getWith("Human", "Human"); EXPECT_TRUE(res.empty()); - res = onto_ptr->classes.getWith("man", "integer#2"); + res = onto_ptr->classes.getWith("Man", "integer#2"); EXPECT_TRUE(res.empty()); } @@ -333,7 +333,7 @@ TEST(api_relations, individual_getRelationFrom) (std::find(res.begin(), res.end(), "have3Dposition") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getRelationFrom("man"); + res = onto_ptr->individuals.getRelationFrom("Man"); EXPECT_TRUE(res.empty()); } @@ -364,7 +364,7 @@ TEST(api_relations, individual_getRelatedFrom) (std::find(res.begin(), res.end(), "blue_cube") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getRelatedFrom("human"); + res = onto_ptr->individuals.getRelatedFrom("Human"); EXPECT_TRUE(res.empty()); } @@ -395,7 +395,7 @@ TEST(api_relations, individual_getRelationOn) res_bool = (std::find(res.begin(), res.end(), "hasLeg") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getRelationOn("human"); + res = onto_ptr->individuals.getRelationOn("Human"); EXPECT_TRUE(res.empty()); } @@ -440,8 +440,8 @@ TEST(api_relations, individual_getRelationWith) res = onto_ptr->individuals.getRelationWith("alice"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "integer#2") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->individuals.getRelationWith("kevin"); @@ -454,8 +454,8 @@ TEST(api_relations, individual_getRelationWith) res = onto_ptr->individuals.getRelationWith("bob"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "integer#0") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end()) && - (std::find(res.begin(), res.end(), "woman") != res.end())); + (std::find(res.begin(), res.end(), "Man") != res.end()) && + (std::find(res.begin(), res.end(), "Woman") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->individuals.getRelationWith("cube1"); @@ -472,14 +472,14 @@ TEST(api_relations, individual_getRelatedWith) std::vector res; bool res_bool = true; - res = onto_ptr->individuals.getRelatedWith("woman"); + res = onto_ptr->individuals.getRelatedWith("Woman"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "kevin") != res.end()) && (std::find(res.begin(), res.end(), "alice") != res.end()) && (std::find(res.begin(), res.end(), "bob") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getRelatedWith("man"); + res = onto_ptr->individuals.getRelatedWith("Man"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "kevin") != res.end()) && (std::find(res.begin(), res.end(), "alice") != res.end()) && @@ -497,7 +497,7 @@ TEST(api_relations, individual_getRelatedWith) (std::find(res.begin(), res.end(), "bob") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getRelatedWith("human"); + res = onto_ptr->individuals.getRelatedWith("Human"); EXPECT_TRUE(res.empty()); } @@ -506,21 +506,21 @@ TEST(api_relations, individual_getFrom) std::vector res; bool res_bool = true; - res = onto_ptr->individuals.getFrom("hasMother", "woman"); + res = onto_ptr->individuals.getFrom("hasMother", "Woman"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "kevin") != res.end()) && (std::find(res.begin(), res.end(), "alice") != res.end()) && (std::find(res.begin(), res.end(), "bob") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getFrom("hasParent", "woman"); + res = onto_ptr->individuals.getFrom("hasParent", "Woman"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "kevin") != res.end()) && (std::find(res.begin(), res.end(), "alice") != res.end()) && (std::find(res.begin(), res.end(), "bob") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getFrom("hasParent", "human"); + res = onto_ptr->individuals.getFrom("hasParent", "Human"); EXPECT_EQ(res.size(), 3); res_bool = ((std::find(res.begin(), res.end(), "kevin") != res.end()) && (std::find(res.begin(), res.end(), "alice") != res.end()) && @@ -538,7 +538,7 @@ TEST(api_relations, individual_getFrom) res_bool = (std::find(res.begin(), res.end(), "alice") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getFrom("hasMother", "man"); + res = onto_ptr->individuals.getFrom("hasMother", "Man"); EXPECT_TRUE(res.empty()); } @@ -559,18 +559,18 @@ TEST(api_relations, individual_getOn) res = onto_ptr->individuals.getOn("alice", "hasFather"); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), "man") != res.end()); + res_bool = (std::find(res.begin(), res.end(), "Man") != res.end()); EXPECT_TRUE(res_bool); res = onto_ptr->individuals.getOn("bob", "hasMother"); EXPECT_EQ(res.size(), 1); - res_bool = (std::find(res.begin(), res.end(), "woman") != res.end()); + res_bool = (std::find(res.begin(), res.end(), "Woman") != res.end()); EXPECT_TRUE(res_bool); res = onto_ptr->individuals.getOn("alice", "hasParent"); EXPECT_EQ(res.size(), 2); - res_bool = ((std::find(res.begin(), res.end(), "woman") != res.end()) && - (std::find(res.begin(), res.end(), "man") != res.end())); + res_bool = ((std::find(res.begin(), res.end(), "Woman") != res.end()) && + (std::find(res.begin(), res.end(), "Man") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->individuals.getOn("kevin", "hasParent"); @@ -579,7 +579,7 @@ TEST(api_relations, individual_getOn) (std::find(res.begin(), res.end(), "bob") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getOn("man", "hasLeg"); + res = onto_ptr->individuals.getOn("Man", "hasLeg"); EXPECT_TRUE(res.empty()); } @@ -594,7 +594,7 @@ TEST(api_relations, individual_getWith) (std::find(res.begin(), res.end(), "hasParent") != res.end())); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getWith("bob", "man"); + res = onto_ptr->individuals.getWith("bob", "Man"); EXPECT_EQ(res.size(), 2); res_bool = ((std::find(res.begin(), res.end(), "hasFather") != res.end()) && (std::find(res.begin(), res.end(), "hasParent") != res.end())); @@ -610,7 +610,7 @@ TEST(api_relations, individual_getWith) res_bool = (std::find(res.begin(), res.end(), "hasLeg") != res.end()); EXPECT_TRUE(res_bool); - res = onto_ptr->individuals.getWith("alice", "human"); + res = onto_ptr->individuals.getWith("alice", "Human"); EXPECT_TRUE(res.empty()); res = onto_ptr->individuals.getWith("bob", "integer#2"); diff --git a/src/tests/CI/feature_deep_copy_test.cpp b/src/tests/CI/feature_deep_copy_test.cpp index 906fb2a1..4976bc21 100644 --- a/src/tests/CI/feature_deep_copy_test.cpp +++ b/src/tests/CI/feature_deep_copy_test.cpp @@ -19,7 +19,7 @@ TEST(feature_deep_copy, copy) onto1.readFromFile(path); path = path_base + "/files/positionProperty.owl"; onto1.readFromFile(path); - path = path_base + "/files/testIndividuals.owl"; + path = path_base + "/files/test_individuals.owl"; onto1.readFromFile(path); onto1.close(); diff --git a/src/tests/CI/feature_multi_test.cpp b/src/tests/CI/feature_multi_test.cpp index fc57195d..29e8c42e 100644 --- a/src/tests/CI/feature_multi_test.cpp +++ b/src/tests/CI/feature_multi_test.cpp @@ -13,25 +13,25 @@ TEST(feature_multi, create) { std::vector res; bool res_bool = true; - std::string test_word = "robot"; + std::string test_word = "Robot"; EXPECT_TRUE(onto_ptr->add("paul")); (*onto_ptr)["paul"]->close(); (*onto_ptr)["paul"]->feeder.waitConnected(); - (*onto_ptr)["paul"]->feeder.addConcept("human"); - (*onto_ptr)["paul"]->feeder.addInheritage("man", "human"); - (*onto_ptr)["paul"]->feeder.addInheritage("woman", "human"); - (*onto_ptr)["paul"]->feeder.addInheritage("human", "agent"); - (*onto_ptr)["paul"]->feeder.addInheritage("robot", "agent"); - (*onto_ptr)["paul"]->feeder.addInheritage("pepper", "robot"); + (*onto_ptr)["paul"]->feeder.addConcept("Human"); + (*onto_ptr)["paul"]->feeder.addInheritage("Man", "Human"); + (*onto_ptr)["paul"]->feeder.addInheritage("Woman", "Human"); + (*onto_ptr)["paul"]->feeder.addInheritage("Human", "Agent"); + (*onto_ptr)["paul"]->feeder.addInheritage("Robot", "Agent"); + (*onto_ptr)["paul"]->feeder.addInheritage("pepper", "Robot"); (*onto_ptr)["paul"]->feeder.waitUpdate(500); res = (*onto_ptr)["paul"]->classes.getUp(test_word); res_bool = ((res.size() == 2) && - (std::find(res.begin(), res.end(), "robot") != res.end()) && - (std::find(res.begin(), res.end(), "agent") != res.end())); + (std::find(res.begin(), res.end(), "Robot") != res.end()) && + (std::find(res.begin(), res.end(), "Agent") != res.end())); EXPECT_TRUE(res_bool); EXPECT_TRUE(onto_ptr->get("paul") != nullptr); @@ -54,33 +54,33 @@ TEST(feature_multi, differences) (*onto_ptr)["bob"]->close(); (*onto_ptr)["paul"]->feeder.waitConnected(); - (*onto_ptr)["paul"]->feeder.addConcept("human"); - (*onto_ptr)["paul"]->feeder.addInheritage("man", "human"); - (*onto_ptr)["paul"]->feeder.addInheritage("woman", "human"); - (*onto_ptr)["paul"]->feeder.addInheritage("human", "agent"); - (*onto_ptr)["paul"]->feeder.addInheritage("robot", "agent"); - (*onto_ptr)["paul"]->feeder.addInheritage("pepper", "robot"); + (*onto_ptr)["paul"]->feeder.addConcept("Human"); + (*onto_ptr)["paul"]->feeder.addInheritage("Man", "Human"); + (*onto_ptr)["paul"]->feeder.addInheritage("Woman", "Human"); + (*onto_ptr)["paul"]->feeder.addInheritage("Human", "Agent"); + (*onto_ptr)["paul"]->feeder.addInheritage("Robot", "Agent"); + (*onto_ptr)["paul"]->feeder.addInheritage("pepper", "Robot"); (*onto_ptr)["paul"]->feeder.waitUpdate(500); (*onto_ptr)["bob"]->feeder.waitConnected(); - (*onto_ptr)["bob"]->feeder.addConcept("human"); - (*onto_ptr)["bob"]->feeder.addInheritage("man", "human"); - (*onto_ptr)["bob"]->feeder.addInheritage("woman", "human"); - (*onto_ptr)["bob"]->feeder.addInheritage("human", "agent"); - (*onto_ptr)["bob"]->feeder.addInheritage("robot", "agent"); - (*onto_ptr)["bob"]->feeder.addInheritage("pepper", "human"); + (*onto_ptr)["bob"]->feeder.addConcept("Human"); + (*onto_ptr)["bob"]->feeder.addInheritage("Man", "Human"); + (*onto_ptr)["bob"]->feeder.addInheritage("Woman", "Human"); + (*onto_ptr)["bob"]->feeder.addInheritage("Human", "Agent"); + (*onto_ptr)["bob"]->feeder.addInheritage("Robot", "Agent"); + (*onto_ptr)["bob"]->feeder.addInheritage("pepper", "Human"); (*onto_ptr)["bob"]->feeder.waitUpdate(500); res = onto_ptr->getDifference("paul", "bob", "pepper"); res_bool = ((res.size() == 2) && - (std::find(res.begin(), res.end(), "[+]pepper|isA|robot") != res.end()) && - (std::find(res.begin(), res.end(), "[-]pepper|isA|human") != res.end())); + (std::find(res.begin(), res.end(), "[+]pepper|isA|Robot") != res.end()) && + (std::find(res.begin(), res.end(), "[-]pepper|isA|Human") != res.end())); EXPECT_TRUE(res_bool); res = onto_ptr->getDifference("bob", "paul", "pepper"); res_bool = ((res.size() == 2) && - (std::find(res.begin(), res.end(), "[-]pepper|isA|robot") != res.end()) && - (std::find(res.begin(), res.end(), "[+]pepper|isA|human") != res.end())); + (std::find(res.begin(), res.end(), "[-]pepper|isA|Robot") != res.end()) && + (std::find(res.begin(), res.end(), "[+]pepper|isA|Human") != res.end())); EXPECT_TRUE(res_bool); EXPECT_TRUE(onto_ptr->get("paul") != nullptr); diff --git a/src/tests/CI/reasoning_mechanism_test.cpp b/src/tests/CI/reasoning_mechanism_test.cpp index 7e5c3f10..d4fadc3c 100644 --- a/src/tests/CI/reasoning_mechanism_test.cpp +++ b/src/tests/CI/reasoning_mechanism_test.cpp @@ -61,7 +61,7 @@ TEST(reasoning_mechanism, reasoners_effect) path = path_base + "/files/positionProperty.owl"; EXPECT_TRUE(onto_ptr->actions.fadd(path)); - path = path_base + "/files/testIndividuals.owl"; + path = path_base + "/files/test_individuals.owl"; EXPECT_TRUE(onto_ptr->actions.fadd(path)); EXPECT_TRUE(onto_ptr->actions.close()); diff --git a/src/tests/Performances/tester.cpp b/src/tests/Performances/tester.cpp index 92358e3e..a7b2c0bf 100644 --- a/src/tests/Performances/tester.cpp +++ b/src/tests/Performances/tester.cpp @@ -113,7 +113,7 @@ int main(int argc, char** argv) /*onto.readFromFile("/home/gsarthou/Robots/Pr2/Semantic/catkin_ws/src/ontologenius/files/attribute.owl"); onto.readFromFile("/home/gsarthou/Robots/Pr2/Semantic/catkin_ws/src/ontologenius/files/positionProperty.owl"); - onto.readFromFile("/home/gsarthou/Robots/Pr2/Semantic/catkin_ws/src/ontologenius/files/testIndividuals.owl");*/ + onto.readFromFile("/home/gsarthou/Robots/Pr2/Semantic/catkin_ws/src/ontologenius/files/test_individuals.owl");*/ // onto.readFromFile("/home/gsarthou/Downloads/owl-export-unversioned.owl"); onto.readFromFile("/home/gsarthou/openrobots/share/ontologies/testsuite.owl");