VI Analyzer Enthusiasts Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Analyzer Test Idea - AF "default" methods

Solved!
Go to solution

Hello everyone,

 

I don't have experience with creation of VI Analyzer tests, but I've got idea about one, so maybe someone already had something done for this, or could suggest, how to start with creation of such the test.

 

Maybe, it'll be useful to have test, which would detect, that "standard" Actor's methods (like, Actor Core, Pre launch init, etc.) for actors in the project contain the default methods, and no additional code.

 

For example - first, was overriden method Stop Core.vi; and added closing of some references. Later on, it was decided that references are not needed to close, so that code was removed. As a result, Stop Core.vi calls just  parent's method -> thus it's not needed to keep it in the project, and we could remove it.

 

It could help to keep just those methods, which are really overriden. And test could just point out, which methods are like this - and it's up to programmer then, whether to leave them or remove from the project.

 

Sincerely, kosist90.

0 Kudos
Message 1 of 3
(3,247 Views)
Solution
Accepted by topic author kosist90

This is a good idea, though I don't see that it should be confined to AF (and it would be harder to write if it was).

 

Really, *any* dynamic dispatch override with only a Call Parent node should get flagged.  The only reason to have such a method is because you plan to add code to it very soon, say, in your current sprint cycle.

 

It would be easy to write, too.  If the VI is a member of a class, list all the nodes on the block diagram.  If there is only one, and it is Call Parent Node, fail the test.

Message 2 of 3
(3,232 Views)

Thank you very much!

Somehow I was sticked to actors' methods, but indeed the same could be applied to any classes hierarchy...

0 Kudos
Message 3 of 3
(3,205 Views)