dss icon indicating copy to clipboard operation
dss copied to clipboard

lack of tests for `rpow` (?)

Open yaronvel opened this issue 4 years ago • 3 comments

rpow is implemented in jug.sol and drip.sol. The function is complex enough to deserve some dedicated tests but I do not find any in the dss repository.

I am guessing the function was first implemented elsewhere and was tested there, and would appreciate if I could get a reference for it. I am working on a project that integrates with the dss, and needs to duplicate the rpow logic. Hence, a reference for the tests would help me test my code.

yaronvel avatar Sep 21 '20 12:09 yaronvel

added a PR with a basic test for rpow. https://github.com/makerdao/dss/pull/145

yaronvel avatar Oct 03 '20 18:10 yaronvel

The rpow function is tested via formal verification in https://github.com/makerdao/k-dss. Anyway thank you very much for your PR, we will look into it.

gbalabasquer avatar Oct 05 '20 12:10 gbalabasquer

“Beware of bugs in the above code; I have only proved it correct, not tried it.”

― Donald Knuth

But on a more serious note, i guess klab and dapp test environment relies on the same underlying tools, so it is probably ok.

yaronvel avatar Oct 05 '20 13:10 yaronvel