KayLeadfoot@fedia.io to Programmer Humor@programming.dev · 2 days agoHope y'all are having a very NULL QA dayfedia.ioexternal-linkmessage-square14fedilinkarrow-up1808arrow-down121
arrow-up1787arrow-down1external-linkHope y'all are having a very NULL QA dayfedia.ioKayLeadfoot@fedia.io to Programmer Humor@programming.dev · 2 days agomessage-square14fedilink
minus-squarecsm10495@sh.itjust.workslinkfedilinkEnglisharrow-up24·edit-22 days agoI once had a QA engineer file a bug saying they couldn’t do negative testing since negative numbers were converted to positive. The function took an unsigned integer. Took a lot of explaining to get them to understand that negative testing isn’t necessarily negative numbers.
minus-squareIron Lynx@lemmy.worldlinkfedilinkarrow-up7·1 day agoHe asked for -1 beers. He got interpreted as 264 - 1 beers (assuming 64-bit unsigned integers)
minus-squaretauren@lemm.eelinkfedilinkEnglisharrow-up8·2 days agoI’d argue that the system shouldn’t automatically convert negative numbers to positive numbers. Instead, it should display an error to the user. Of course, that’s an abstract thought as I don’t know what was the system and who interacted with it.
minus-squarecsm10495@sh.itjust.workslinkfedilinkEnglisharrow-up3·1 day agoFor something end-user facing: I could understand this argument. In this case they were more or less just calling a C function that had an unsigned long long as the parameter they were setting negative. The whole ‘bug’ was that the other side of the function call was seeing a positive number no matter what. The real situation was a bit more complicated, but that’s the gist.
I once had a QA engineer file a bug saying they couldn’t do negative testing since negative numbers were converted to positive.
The function took an unsigned integer. Took a lot of explaining to get them to understand that negative testing isn’t necessarily negative numbers.
He asked for -1 beers. He got interpreted as 264 - 1 beers (assuming 64-bit unsigned integers)
I’d argue that the system shouldn’t automatically convert negative numbers to positive numbers. Instead, it should display an error to the user. Of course, that’s an abstract thought as I don’t know what was the system and who interacted with it.
For something end-user facing: I could understand this argument.
In this case they were more or less just calling a C function that had an unsigned long long as the parameter they were setting negative.
The whole ‘bug’ was that the other side of the function call was seeing a positive number no matter what.
The real situation was a bit more complicated, but that’s the gist.