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

Uses Picard Unmarshalling in Tests also improves tests to be explicit… #54

Merged
merged 6 commits into from
Sep 10, 2018

Conversation

plusplusben
Copy link
Contributor

… about expectations

@plusplusben plusplusben self-assigned this Sep 7, 2018
Copy link
Contributor

@mochacat mochacat left a comment

Choose a reason for hiding this comment

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

Thanks for improving our tests! Just have a couple style comments.

@@ -8,7 +8,7 @@ import (
"github.com/modern-go/reflect2"
jsoniter "github.com/plusplusben/json-iterator-go"
"github.com/skuid/picard/metadata"
"github.com/skuid/warden/pkg/mapvalue"
"github.com/skuid/picard/stringutils"
Copy link
Contributor

Choose a reason for hiding this comment

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

Good call!

picard.go Outdated
return false
}

func isZeroValue(v reflect.Value) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be better in some kind of reflect utils file (like your stringutils).

We can also use isZeroValue in another place.

@@ -0,0 +1,11 @@
package stringutils
Copy link
Contributor

Choose a reason for hiding this comment

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

Some style guides for Go say to only use singular package names (stringutil), not plural (stringutils). Not sure if we should care that much, especially since theres packages like "errors" and "strings" that deviate from this. Just throwing that out there.

@plusplusben plusplusben merged commit a519cbc into master Sep 10, 2018
@plusplusben plusplusben deleted the use-picard-serialization-in-tests branch September 10, 2018 15:36
@ghost ghost unassigned plusplusben Oct 25, 2019
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