Closed stnokott closed 1 year ago
With #41, whichever gets merged last, will probably have merge conflicts due to the renaming of DissectReader
to Reader
.
I'll happily fix them in this PR though if you want to merge #41 first.
Thanks for handling the conflicts! You can add the rec files now with the updated gitignore
You can add the rec files now with the updated gitignore
Oh wow, didnt even notice those weren't uploaded.
I tried uploading them, but they exceed the Git size limit of 100MB. Do you think we should add something like [Git LFS}(https://git-lfs.com)?
Yeah we could just upload them with lfs
How do they exceed the size limit? Isn't one like usually 12mb?
I was not thinking LFS would be necessary
As far as I know, we should not need LFS? But, I would agree that is the way to go if needed
Ah no nevermind, I wasn't thinking straight, I had a test testing on the unzipped replay file which then was like 130MB. I'll remove that test, should be fine to upload then.
Validating equality of JSON output of multiple functions relating to
DissectReader
:NewReader
ReadPartial
Read
Each test follows the same basic procedure:
DissectReader
after reading the replay file (each test has a different scope/behaviour here)There currently is a folder for Y8S1 replays, for future (or past) seasons, we can just simply add another folder, as long as each replay comes with a expected JSON of the same name. The tests will automatically pick these files up.
To enable testing for a few aspects of the output, I had to change how the JSON is (un)marshalled for some types. In most cases, this only included implementing the
json.Unmarshaler
interface. For one type,MatchUpdateType
though, I had to also change thejson.Marshaler
implementation since the previous one didn't allow deriving the original value from the marshalled JSON. (seefeedback.go
)Closes #38.