[template] Arguments substititation, class arguments checking, arguments in params duplication#41
Open
NikitaZotov wants to merge 5 commits intomainfrom
Open
[template] Arguments substititation, class arguments checking, arguments in params duplication#41NikitaZotov wants to merge 5 commits intomainfrom
NikitaZotov wants to merge 5 commits intomainfrom
Conversation
MksmOrlov
requested changes
Jan 30, 2023
Member
MksmOrlov
left a comment
There was a problem hiding this comment.
- Add tests
- Update documentation, changelog
- Fix commit and branch naming style
… in params duplication
3bc4b24 to
952d33e
Compare
| for (ScAddr const & argument : argumentList) // this block is executed if inputStructure is valid | ||
| ScIterator5Ptr const & classesIterator = context->Iterator5( | ||
| ScType::NodeConstClass, ScType::EdgeAccessVarPosPerm, var, ScType::EdgeAccessConstPosPerm, scTemplate); | ||
| bool isBelong = false; |
Member
There was a problem hiding this comment.
I think this var should be initialized with true. In that case replacements for variables without classes will be searched in arguments and not in input structure
Member
kilativ-dotcom
left a comment
There was a problem hiding this comment.
looks like this test does not call TemplateManager::createTemplateParams
MksmOrlov
requested changes
Jan 31, 2023
Comment on lines
+30
to
+31
| sc_node_class | ||
| -> concept_human;; |
Member
There was a problem hiding this comment.
add sc_node_norole_relation for nrel_system_identifier and nrel_father
Comment on lines
+1
to
+15
| @template = [* | ||
| _hum1 | ||
| _=> nrel_father:: | ||
| _hum2;; | ||
|
|
||
| _hum3 | ||
| _=> nrel_father:: | ||
| _hum2;; | ||
|
|
||
| concept_human | ||
| _-> _hum1; | ||
| _-> _hum3;; | ||
| *];; | ||
| @template | ||
| => nrel_system_identifier: [search_template];; |
Member
There was a problem hiding this comment.
why not
search_template = [* .... *];;
Comment on lines
+17
to
+25
| human_ivan_ivanov | ||
| <- concept_human; | ||
| => nrel_father: | ||
| human_andrey_ivanov;; | ||
|
|
||
| human_pavel_ivanov | ||
| <- concept_human; | ||
| => nrel_father: | ||
| human_andrey_ivanov;; |
Comment on lines
+10
to
+12
| concept_human | ||
| _-> _hum1; | ||
| _-> _hum3;; |
Comment on lines
+108
to
+111
| std::string firstHuman = "human_ivan_ivanov"; | ||
| std::string secondHuman = "human_pavel_ivanov"; | ||
| std::string varHumanName1 = "_hum1"; | ||
| std::string varHumanName3 = "_hum3"; |
| loader.loadScsFile(context, TEST_FILES_DIR_PATH + "searchWithContentEqualResultTestStucture.scs"); | ||
| initialize(); | ||
|
|
||
| ScAddr searchTemplateAddr = context.HelperFindBySystemIdtf(TEST_SEARCH_TEMPLATE_ID); |
| for (ScAddr const & argument : argumentList) // this block is executed if inputStructure is valid | ||
| ScIterator5Ptr const & classesIterator = context->Iterator5( | ||
| ScType::NodeConstClass, ScType::EdgeAccessVarPosPerm, var, ScType::EdgeAccessConstPosPerm, scTemplate); | ||
| bool isBelong = false; |
Member
There was a problem hiding this comment.
is belong what? Name variables clear
| searchResults[0][searchLinkIdentifier] == context.HelperFindBySystemIdtf(secondCorrectResultLinkIdentifier)); | ||
| } | ||
|
|
||
| TEST_F(TemplateSearchManagerTest, SearchWithContent_EqualResultTestCase) |
Member
There was a problem hiding this comment.
There is no content in this template. Rename test and scs file for it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: