IdGen icon indicating copy to clipboard operation
IdGen copied to clipboard

Fixed an off by 1 issue related to maxmium GeneratorId.

Open Throwy opened this issue 1 year ago • 2 comments

Max generator id was being calculated as 1 higher than the actual max. This has been corrected and the message in the exception thrown when the given generator id is invalid has been appropriately re-worded to include 0 and maxgeneratorid.

Throwy avatar May 24 '24 15:05 Throwy

Oh, wow, I can't believe I missed this. Would you be so kind to also include a unittest that tests for the max and max+1 cases (using an ExpectedException like here for the max+1 case) ? Maybe also add 0 and -1 so we have the positive and negative boundaries covered. If not, I'll write them myself but I'm away from now till after the weekend.

RobThree avatar May 24 '24 15:05 RobThree

I sure can. I'll work on updating the PR today. Funnily enough, I only found this because the wording 'between' was slightly misleading and was just going to make a PR to change the wording.

Throwy avatar May 24 '24 15:05 Throwy

I just published a new release. Thanks for your work! Much appreciated 👏 👊

RobThree avatar May 26 '24 19:05 RobThree

Thanks and no problem! I'm excited to start using this

Throwy avatar May 26 '24 20:05 Throwy