1. stack.e changes
- Posted by Jeremy Cowgar <jeremy at cowgar?co?> May 08, 2008
- 601 views
Chris, I tried to email you but I must not have a correct email address for you. But some of the unit tests for stack are now failing after the latest commit. Before committing, can you please cd tests exwc all.ex and make sure the tests still pass? the dup() and pop() for FIFO fail now. -- Jeremy Cowgar http://jeremy.cowgar.com
2. Re: stack.e changes
- Posted by CChris <christian.cuvier at agricul?ur?.gouv.fr> May 08, 2008
- 605 views
Jeremy Cowgar wrote: > > Chris, > > I tried to email you but I must not have a correct email address for you. But > some of the unit tests for stack are now failing after the latest commit. > Before > committing, can you please > > cd tests > exwc all.ex > > and make sure the tests still pass? the dup() and pop() for FIFO fail now. > > -- > Jeremy Cowgar > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a> Use oedoc hat free doubt fr as email, but I don't look at it in real time. Problem is that dup() is not documented. I assumed that dup() means: push the value pushed last. And in that case, the stack should be {30,30,20,10}, not {30,20,10,10}. If it was meant to duplicate the top of stack rather, then the test is right and my change is not. The pop() test fails because of the discrepancy for dup(). CChris
3. Re: stack.e changes
- Posted by Jeremy Cowgar <jeremy at c?wgar.co?> May 08, 2008
- 586 views
CChris wrote: > > > Problem is that dup() is not documented. > I assumed that dup() means: push the value pushed last. And in that case, the > stack should be {30,30,20,10}, not {30,20,10,10}. > If it was meant to duplicate the top of stack rather, then the test is right > and my change is not. The pop() test fails because of the discrepancy for > dup(). > dup() should duplicate top(). dup() could be as simple as: dup() = push(top()) I would keep the length() check in dup() so a meaningful error message can result in it's misuse. -- Jeremy Cowgar http://jeremy.cowgar.com