Skip to content
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

Additional test for D< #21

Closed
ellerh opened this issue Aug 5, 2017 · 2 comments
Closed

Additional test for D< #21

ellerh opened this issue Aug 5, 2017 · 2 comments

Comments

@ellerh
Copy link

ellerh commented Aug 5, 2017

I'd like to suggest the following test for D<:
T{ 0 1 1 0 D< -> FALSE }T

While reading lbForth's code, I found this definition:
: d< rot > if 2drop -1 else u< then ;
which looked suprisingly concise to me, but it doesn't handle the test correctly. At the moment no other tests seems to expose the bug in lbForth's D<.

@gerryjackson
Copy link
Owner

Excellent suggestion, I'll incorporate it into the double number tests later today. I think that anything like this, where an implementation is incorrect but not detected by the test programs, should have a test included to detect the fault (if detectable of course).
Many thanks.

gerryjackson added a commit that referenced this issue Aug 7, 2017
Test added as suggested by Helmut Eller for detection of plausible but faulty definition of D< plus similar test with negative operands. Also added for DU<. See issue #21.
@gerryjackson
Copy link
Owner

Test added with similar test for negative operands. Also added for DU<

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants