forth: Add new tests from x-common#413
Merged
petertseng merged 3 commits intoexercism:masterfrom Nov 7, 2016
petertseng:forth2
Merged
forth: Add new tests from x-common#413petertseng merged 3 commits intoexercism:masterfrom petertseng:forth2
petertseng merged 3 commits intoexercism:masterfrom
petertseng:forth2
Conversation
rbasso
approved these changes
Nov 7, 2016
Contributor
rbasso
left a comment
There was a problem hiding this comment.
Everything seems fine here!
I didn't check if the content of each of the tests is correct, but I bet they are. 😁
I guess it will have to be rebased.
| runTexts ["swap" ] `shouldBe` Left StackUnderflow | ||
| it "errors if there is only one value on the stack" $ | ||
| runTexts ["1 swap" ] `shouldBe` Left StackUnderflow | ||
|
|
Contributor
There was a problem hiding this comment.
I see that here you swapped to order of those two test. I like the new ordering more. 👍
Member
Author
There was a problem hiding this comment.
Oh, I was inconsistent. 1 over is before over. I'll make it consistent, and note an order change in commit message.
petertseng
commented
Nov 7, 2016
| it "copies the second element if there are more than two" $ | ||
| runTexts ["1 2 3 over"] `shouldBe` Right [1, 2, 3, 2] | ||
| it "errors if there is nothing on the stack" $ | ||
| runTexts ["1 over" ] `shouldBe` Left StackUnderflow |
Member
Author
There was a problem hiding this comment.
actually it's even worse - the test message doesn't match the actual test!!!
Just as exercism/problem-specifications#394 has it. Most test lines should look clean under `git diff -w` ignoring whitespace since they were simply indented. EXCEPTIONS: swap/over tests have changed ordering: The "nothing on stack" tests now come before the "one value on the stack" tests. The divide by zero test is now a simple `4 0 /` rather than `4 2 2 - /` to be more straightforward. It is separated from the combined arithmetic tests, in anticipate of more dedicated division tests coming soon.
It was removed in exercism/problem-specifications#394
These are tests for each of the individual arithmetic operators, and one for making sure user-defined words execute in the right order.
Member
Author
|
Everything should be OK now - the only change is to rebase and also to fix the ordering of the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First commit is same as #412, the rest should bring us to match exercism/problem-specifications#394