-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(core dumped) test #33
Comments
Hi @wir19 Did you see the error message? You are basically "using it wrong". test_random <OP> <LHS> <RHS> <RESULT> Where is the operand (enum), is the left-hand-side, is the right-hand-side and the expected results. The function with the failing assertion is #25 reports the very same issue. |
did You run this file and read example? second run this make clean all test
|
Hi @xor256 I don't understand what you are trying to say - can you rephrase/explain further? |
Please run test_random without any parameters You can read exactly this example. (You wrote "Did you see the error message?" ok, Did You read program help?) ./test_random 3 0100 80 02 is from help information when You run this program without parameter. second trouble is 'make test' generate errors (look above) |
Maybe I'm misunderstanding you @xor256 , but you're not supposed to run The python script inserts relevant parameters in the Makefile - which leads to your second trouble:
$ make clean all test
================================================================================
Running "golden" tests (parsed using from_int):
[TEXT OMITTED]
152/152 tests successful.
================================================================================
Running hand-picked test cases:
3/3 tests successful.
================================================================================
Loading numbers from strings and from int.
Verifying comparison function.
Verifying to_string function.
Verifying increment + decrement functions.
Tests successful.
================================================================================
factorial(100) using Python = 1b30964ec395dc24069528d54bbda40d16e966ef9a70eb21b5b2943a321cdf10391745570cca9420c6ecb3b72ed2ee8b02ea2735c61a000000000000000000000000
factorial(100) using bignum = 1b30964ec395dc24069528d54bbda40d16e966ef9a70eb21b5b2943a321cdf10391745570cca9420c6ecb3b72ed2ee8b02ea2735c61a000000000000000000000000
================================================================================
Running test cases from error log (cases that failed during development).
1005/1005 tests passed.
================================================================================
Running 1000 random tests (parsed using from_string):
[TEXT OMITTED]
1000/1000 random tests passed.
================================================================================ So I guess it's a difference in our environments that is causing the trouble. Using an Alpine docker-container
... this works for me: apk add git musl-dev make gcc python2
cd /tmp
git clone https://github.com/kokke/tiny-bignum-c.git
cd tiny-bignum-c
make clean all test |
Could be an issue of Python2 vs Python3 - #29 alludes to that |
|
Does this f5586b4 address your objections ? I did not expect the test-code to be scrutinized to this degree :) Thanks for helping me find the issue @xor256 |
@xor256 I noticed that you responded with "thumbs-down" and "eyes" to my responses. Can you please put a few more words on that? Otherwise, I'm not sure what exactly you are objecting against :( |
The thumbs down is unfortunately a certain attitude of yours. "it's all good why do you have a grudge, I'm not wrong" eyes always mean "I'm looking" or "looking". [ OK ] 262144 >> 18 = 1 152/152 tests successful. ================================================================================ Running hand-picked test cases: 3/3 tests successful. ================================================================================ Loading numbers from strings and from int. Tests successful. ================================================================================
|
Yup, that's the problem. The old scripts are not python3-compatible as is. Run them under python2 or consider upgrading them to python3.
That did not help me understand what you are objecting to. |
meybe using Ruby not python? no python no problem ;-) |
I had not understood that "make clean all test" failed, so I thought "why are you even running this stuff manually? just use the makefile as described". There was not a lot of description text to go by. Again: thank you for helping me understand the real issue here. The "usage-text" describing how to call
Haha of course :P |
./test_random 3 0100 80 02
The text was updated successfully, but these errors were encountered: