Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

test Assert method usage is reversed - now fixed #101

Merged
merged 2 commits into from
Apr 2, 2015

Conversation

feiranchen
Copy link
Contributor

Just a couple of the more recent test cases had this problem.
The error message would have the "expected" and "actual" values reversed if the tests were to break.

@feiranchen
Copy link
Contributor Author

The issue has now been fixed.

@feiranchen feiranchen changed the title test assert usage is reversed - now fixed test Assert method usage is reversed - now fixed Apr 2, 2015
@feiranchen feiranchen self-assigned this Apr 2, 2015
@@ -19,6 +19,6 @@ func TestRootEmojisService_All(t *testing.T) {
assert.False(t, result.HasError())
var penguin = "https://github.global.ssl.fastly.net/images/icons/emoji/penguin.png?v5"
var metal = "https://github.global.ssl.fastly.net/images/icons/emoji/metal.png?v5"
assert.Equal(t, penguin, emojis["penguin"])
assert.Equal(t, metal, emojis["metal"])
assert.Equal(t, emojis["penguin"], penguin)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these two were actually correct. The expected value is just in a variable for brevity.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it! My bad!

@pengwynn
Copy link
Collaborator

pengwynn commented Apr 2, 2015

Good catch. I made one comment, but the rest of the diff looks good. 👍

feiranchen added a commit that referenced this pull request Apr 2, 2015
test Assert method usage is reversed - now fixed
@feiranchen feiranchen merged commit 90dc35e into master Apr 2, 2015
@feiranchen
Copy link
Contributor Author

Merged and closed. Let me know if there's any questions!

@feiranchen feiranchen deleted the assert-equals-fix branch April 2, 2015 18:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants