rharter / auto-value-gson

AutoValue Extension to add Gson De/Serializer support
Apache License 2.0
603 stars 103 forks source link

Move AutoValueGsonExtensionTest.java "expected" output to separate files #181

Closed 3flex closed 4 years ago

3flex commented 6 years ago

I'm probably just not doing things all that efficiently and there may be a better way, but I'm finding it extremely tedious to modify AutoValueGsonExtensionTest.java for my PR to reflect expected output because of the string concatenation, escaping and manually inserting newlines. I'm sure I can change my IDE's settings to reflect the way it's handled in the test file, but to me it seems simpler to just reference a file that just contains the raw expected output? Copy/pasting from the test report when expected doesn't match actual generated source would make things much easier.

rharter commented 6 years ago

The current setup was from a simpler time, so that makes sense. I think the advantage of this is that its easy to parse because the expectation is right there, but the tests have grown such that I'm definitely open to this.

ZacSweers commented 4 years ago

I think we should just stop using compile-testing for anything other than testing expected build errors, and move the rest to integration tests in the sample project's tests. These are exceedingly difficult to maintain in their current form and what we really care about is functionality, which the current tests don't actually test!

ZacSweers commented 4 years ago

Closing this out for now as we've started setting up integration tests. I don't think there's too much impetus to move one way or the other right now