You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Continuing #4480 on how to make test writing easier, IMHO PP lacks in the area of unit tests. Many tests are in fact integration ones, starting from an XML file. That's however not ideal for all cases, because:
it's unclear what's inside XML, requires opening in PP to just see that well
it's hard to vary testcases a bit (how to do that - create a bunch of XML files, and then maintain them).
So IMHO, there should be improvement to writing unit tests for various core functionality, to increase coverage.
In that regard, it would be nice to have methods where you say "I want to buy 2 stocks, amounted 100 money), and don't bother with explicit fixed-point conversions as tests seem to do now. I started to add overloads like:
in addition to existing long (i.e. fixed-point) taking methods. Would that be ok? Having them as overloads is of course risky if both variants are kept used widely, then it's easy to make mistake (and outright confusing to new users) depending on just the type. So, IMHO it would only work well if there's effort to refactor existing tests to use double variant, and then perhaps rename the fixed-point versions as buyFixPt(), etc.
The text was updated successfully, but these errors were encountered:
@buchen :
Continuing #4480 on how to make test writing easier, IMHO PP lacks in the area of unit tests. Many tests are in fact integration ones, starting from an XML file. That's however not ideal for all cases, because:
So IMHO, there should be improvement to writing unit tests for various core functionality, to increase coverage.
In that regard, it would be nice to have methods where you say "I want to buy 2 stocks, amounted 100 money), and don't bother with explicit fixed-point conversions as tests seem to do now. I started to add overloads like:
in addition to existing
long
(i.e. fixed-point) taking methods. Would that be ok? Having them as overloads is of course risky if both variants are kept used widely, then it's easy to make mistake (and outright confusing to new users) depending on just the type. So, IMHO it would only work well if there's effort to refactor existing tests to use double variant, and then perhaps rename the fixed-point versions as buyFixPt(), etc.The text was updated successfully, but these errors were encountered: