Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Inconsistency between ToJSON and FromJSON instances of PackageLocation #2412
It looks good and sitting around, so let me try a review:
Thanks! I'll see what I can do about those tests.
I did notice the bug by using the
I am not sure how to proceed about the tests.
One way could be having a golden value that can be then printed to file and read back, and then check if the final value matches the original.
Other way would be doing a QuickCheck based test, requiring an
In the other hand, the test directory contains two directories: integration and package-dump. None of these seem to be the place for round-trip tests.
I'd go the first way—but not to a file, just to Text/ByteString and back, in both directions, and use a few golden values to cover the different cases.
I think you want