-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Unit tests #37
Unit tests #37
Conversation
squash me squash me squash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Main thing is to try and use more table driven testing
state/state_test.go
Outdated
} | ||
|
||
setRecords(s) | ||
assert.True(t, bytes.Equal(s.Get([]byte("foo")), []byte("snake")), "state doesn't retrieve after Set") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would love to see a more table driven approach for a lot of these tests: https://dave.cheney.net/2013/06/09/writing-table-driven-tests-in-go
types/account_test.go
Outdated
accCopy.Sequence = 1 | ||
t.Log(acc.Sequence) | ||
t.Log(accCopy.Sequence) | ||
assert.True(t, acc.Sequence != accCopy.Sequence, "Account Copy Error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not check the accounts are equal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay switched. was confused because the pointer wasn't equal but that makes sense, not supposed to be.
a10d474
to
e6579cf
Compare
Nano Support
* Execute validator unbonding at consensus changeover * Fix producing block status of genesis validators * Add comments
…ns/actions/cache-3.0.1 chore(deps): bump actions/cache from 2.1.6 to 3.0.1
NOTE this is branched from queryReg which is in the PR, should merge after PR #26