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

Refactor write_test common parts + add map tests. #3

Merged
merged 2 commits into from
Feb 26, 2018

Conversation

rayhaanj
Copy link
Collaborator

@rayhaanj rayhaanj commented Feb 22, 2018

There was a bit of repetitiveness in the tests comparing doing the same write /
compare. This change refactors that into a helper function.

Also added a case for integer slices, and tests for map[string]interface{}, map[int]interface{}

There was a bit of repetitiveness in the tests comparing doing the same write /
compare. This change refactors that into a helper function.
Methods added to test int keyed maps and string keyed maps.
@rayhaanj rayhaanj changed the title Refactor write_test common parts. Refactor write_test common parts + add map tests. Feb 22, 2018
Copy link
Owner

@britram britram left a comment

Choose a reason for hiding this comment

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

LGTM (modulo question, which is informative only)

0x68, 0x02, 0x76, 0x43, 0x6F, 0x6E, 0x66, 0xC3, 0xA9,
0x64, 0xC3, 0xA9, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E,
0x20, 0x53, 0x75, 0x69, 0x73, 0x73, 0x65},
},
Copy link
Owner

Choose a reason for hiding this comment

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

quick Q: where was this vector generated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I used the web based converter at: http://cbor.me/ to generate those bytes.

@britram britram merged commit 8d9af4c into britram:master Feb 26, 2018
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

Successfully merging this pull request may close these issues.

2 participants