adesutherland / CREXX

REXX Language implementation
Other
13 stars 3 forks source link

F0038: X2D bif fails testcases #213

Open rvjansen opened 2 years ago

rvjansen commented 2 years ago

Look for X2D OK failed in test 2 failed in test 3 failed in test 4 hex string contains invalid character c6 f0 failed in test 5 failed in test 6 failed in test 19 failed in test 20 failed in test 64 failed in test 66 failed in test 73 ^C

The original tests have a signal off novalue at that point, this is commented out. When commenting out test 73, the script also loops, earlier in this case, after 66

Peter-Jacob commented 2 years ago

the test case uses a ridiculously long number: if x2d('12',987654321) \= '18' then say 'failed in test 84 ' as we store in long long we can have up to 20 digits. Any length greater than 20 will be reduced to 20.

TS_X2D runs fine in my environment. Please verify and close.

rvjansen commented 2 years ago

I understand. This draws attention to the fact that we must have a whole different set of numerical bifs for level C.

Peter-Jacob commented 2 years ago

I'll open later an issue to check the other conversion bifs. I guess there exist similar length limitationsVon meinem Huawei-Telefon gesendet

rvjansen commented 2 years ago

Reopening this as there are multiple failures in the current testset, also with simpler cases. Did we have a regression somewhere? Current state:

failed in test 12 x2d(81) -127 but must be 129
failed in test 13 x2d(F81) -127 but must be 3969
failed in test 14 x2d(FF81) -127 but must be 65409
hex string contains invalid character c6 f0
hex string contains invalid character c6 f0
failed in test 15 x2d(C6 F0x) 0 but must be 240 but gives error because of space in c6 f0
failed in test 16 x2d(F0) -16 but must be 240
failed in test 29 x2d( FF ) -1 but must be 255
failed in test 30 x2d( FFFF) -1 but must be 65535
failed in test 64 X2D(A) -6 but must be 10
failed in test 66 x2D(80) -128 but must be 128
failed in test 72 x2d(baba) -17734 but must be 47802
rvjansen commented 2 years ago

failed in test 12 x2d(81) -127 but must be 129 failed in test 13 x2d(F81) -127 but must be 3969 failed in test 14 x2d(FF81) -127 but must be 65409

these seem to be caused by a 16 bit int in two-complements all work in 32 bit, so in 64 bit there should not be a problem

rvjansen commented 2 years ago

I have added reradix and ts_reradix which might be used to fix x2d - it passes the above testcases