Skip to content

calculator runner: Fix handling of hexadecimal input/output

Alexander Lohnau requested to merge work/hex_calc_runner into master
  • In case our query starts with 0x123abc we do not call the userFriendlyMultiplication method which replaces the x sign with the multiplication operator. We can be sure that the user wants to parse a hex value. Also the = is not mandatory anymore.
  • The hex=mydecimalnumber functionality was broken. The conversion of the hex value is only done inside of the if statement and before the values will be the same, unless we do some math operation.

Test Plan:
=0xf returns 15
0xf return 15
7x7 returns 49
hex=15 returns 0xF
hex=14+1 returns 0xF

BUG: 431362
FIXED-IN: 5.21

@ngraham @broulik

Edited by Alexander Lohnau

Merge request reports

Loading