Closed trodi closed 6 years ago
@gentooboontoo, is there any issue with this getting merged?
Thank you.
@trodi, looping through all the units and attempting to create an object from them sounds like a good thing to add to the tests, especially since that's how you found these bugs.
@rage-shadowman would you expect the test to live in the "getUnits" or "initialization section of the tests? I'm happy to add the test in another PR if it will be accepted.
@trodi, that would be a question for @gentooboontoo to answer. If he doesn't care, then I would think either in "initialization" or in its own group. Maybe "aliases"?
@gentooboontoo , any thoughts on this? Also, any chance these changes could be published in a patch release?
I have just published the patch release.
I don't think adding tests of definitions is very important at this point because I am considering to split unit definitions from the library core to allow choice and customization at runtime. There are too divergent opinions about ways to define and use units (pedantic / pragmatic / customized / etc...).
I ran across the same issue as #85, but for
temp-C
. Looping through all theQty.getUnits()
and attempting tonew Qty(x)
, I found 17 definitions that didn't list their own name in the alias list. 16 were missing, while 1 was simply misspelled. I've added the missing aliases.