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

[all] Always assert NotNil for values that, eh, shouldn't be nil ;) #8

Open
zeroXten opened this issue Dec 15, 2014 · 5 comments
Open

Comments

@zeroXten
Copy link
Contributor

Most returns are either "nil, error" or "something, nil". Need to catch accidental "nil, nil"

@zeroXten zeroXten modified the milestone: Release 1 Jan 21, 2015
@jonbonazza
Copy link
Contributor

I noticed also in many of the unit tests you are doing things like asserting NotNil for errors and NotEquals for slice lengths.

The assert package has some more sophisticated functions like NoError (), Error(), Len(), etc... We should take advantage of these where possible.

@zeroXten
Copy link
Contributor Author

Next you'll be suggesting that I read the documentation ;)
On 29 Jan 2015 19:52, "Jon Bonazza" [email protected] wrote:

I noticed also in many of the unit tests you are doing things like
asserting NotNil for errors and NotEquals for slice lengths.

The assert package has some more sophisticated functions like NoError (),
Error(), Len(), etc... We should take advantage of these where possible.


Reply to this email directly or view it on GitHub
#8 (comment).

@jonbonazza
Copy link
Contributor

Lol Did I miss something in the docs? :x

On Thu Jan 29 2015 at 11:56:45 AM Fraser Scott [email protected]
wrote:

Next you'll be suggesting that I read the documentation ;)
On 29 Jan 2015 19:52, "Jon Bonazza" [email protected] wrote:

I noticed also in many of the unit tests you are doing things like
asserting NotNil for errors and NotEquals for slice lengths.

The assert package has some more sophisticated functions like NoError
(),
Error(), Len(), etc... We should take advantage of these where possible.


Reply to this email directly or view it on GitHub
#8 (comment).


Reply to this email directly or view it on GitHub
#8 (comment).

@zeroXten
Copy link
Contributor Author

No no. I think I saw an example that include NotNil and Equal and just ran with those, rather than reading the other possibilities.

@jonbonazza
Copy link
Contributor

Ah gotcha. haha Yea, there are a load of options. I am only familiar myself
with a handful of them, so don't feel bad. haha

On Thu Jan 29 2015 at 1:47:52 PM Fraser Scott [email protected]
wrote:

No no. I think I saw an example that include NotNil and Equal and just ran
with those, rather than reading the other possibilities.


Reply to this email directly or view it on GitHub
#8 (comment).

@zeroXten zeroXten modified the milestone: Release 1 Mar 27, 2015
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