Re: problem with euc on Win10 64bit AND Mint 32bit
- Posted by SDPringle Oct 07, 2015
- 1641 views
It gets worse. I am modifying the subject. I am also changing a little bit your test. I can still reproduce the problem with these changes. Look at what happens on 32-bit Linux:
t_bugmagnet_15.e:
include std/math.e include std/convert.e function Bin(integer n, sequence s = "") if n > 0 then return Bin(floor(n/2),(mod(n,2) + #30) & s) end if if length(s) = 0 then return to_integer("0") end if return to_integer(s) end function include std/unittest.e test_equal("Bin(0) = '0'", "0", sprintf("%d", Bin(0))) test_equal("Bin(5) = '5'", "101", sprintf("%d", Bin(5))) test_equal("Bin(50) = '110010'", "110010", sprintf("%d", Bin(50))) test_equal("Bin(9000) = '10001100101000'", "10001100101000", sprintf("%d", Bin(9000))) test_report()
eutest -euc ../source/build/euc -eui ../source/build/eui -lib ../source/build/eu.a t_bugmagnet_15.eoutput:
interpreting t_bugmagnet_15.e: translating t_bugmagnet_15.e: failed: Bin(5) = '5', expected: "101" but got: "0" failed: Bin(50) = '110010', expected: "110010" but got: "0" failed: Bin(9000) = '10001100101000', expected: "10001100101000" but got: "0" 4 tests run, 1 passed, 3 failed, 25% success FAILURE: t_bugmagnet_15 program died with status 256 Test results summary: FAIL: translated t_bugmagnet_15-translated Files (run: 2) (failed: 1) (50% success)