ptrefall / fluid-hierarchical-task-network

A simple HTN planner based around the principles of the Builder pattern.
MIT License
345 stars 47 forks source link

Clean unused variable in unit test #17

Closed fnaith closed 7 months ago

fnaith commented 7 months ago

Is your feature request related to a problem? Please describe. In the file DomainTests's function FindPlanIfMTRsAreEqualThenReturnNullPlan_ExpectedBehavior, task6 is unused. I'm not sure it will affect the test case or not.

Describe the solution you'd like Contact author and update this test.

Describe alternatives you've considered None.

Additional context These test cases are surprising detailed, GJ.

ptrefall commented 7 months ago

Thank you for the report! I'll have a look.

fnaith commented 7 months ago

and I guess FindPlanIfPlansAreDifferentButMTRsAreEqualThenReturnNullPlan_ExpectedBehavior has same content.

ptrefall commented 7 months ago

Thanks for the report! This has now been cleaned out.

fnaith commented 7 months ago

Somehow FindPlanIfMTRsAreEqualThenReturnNullPlan_ExpectedBehavior and FindPlanIfPlansAreDifferentButMTRsAreEqualThenReturnNullPlan_ExpectedBehavior become identical. But I guess it is intended, thanks for cleaning out !

ptrefall commented 7 months ago

Yes, I noticed that as well. Been too long to remember. I'll have to dig in to those and see if we should keep both. Their name suggests that they "prove" two different things, so it would be nice if the assertions at least diverged a bit.

fnaith commented 7 months ago

Thanks for your response ! I am rasing those trivial issues is because I'm copycating this library in other language. Beside FindPlanIfWorldStateChangeToWorseMRTAndOperatorIsContinuous_ExpectedBehavior might be FindPlanIfWorldStateChangeToWorseMTRAndOperatorIsContinuous_ExpectedBehavior, I think all test cases in this repository are good.

PS. Not checking the doamin builder, because I may need alternative interface for my language.

ptrefall commented 7 months ago

Oh, very cool! What language? If you're open sourcing it I'd be happy to put a link to it in the README, once its ready!

Thanks for going over the tests so thoroughly, it's the best way to improve this library, to have more eyes than mine scan its code and use it in other projects. Or, as in your case, translate it to new languages.

fnaith commented 7 months ago

I'm using GDScript like attached files, but it isn't finished yet. I want to go through the Troll Bridge example before implementing the domain builder.

htn.zip

ptrefall commented 7 months ago

Super cool!

fnaith commented 7 months ago

I think the hard part is done, just need some time to finish the documentation.

https://github.com/fnaith/godot-fluid-hierarchical-task-network

ptrefall commented 7 months ago

Congrats! I'll add it to the readme!