Commit d7759d7
Add assertion on tag type
As pointed out in code review, since the tests only checked that a tag
has decoded, it was possible for a tag to decode successfully but change
tag type, e.g. if two types swapped their IDs. This commit updates the
code to assert on the tag type and make sure they haven’t.
This also exposes the same weakness in the existing tests, in that they
don’t exhaustively check that the binary content deserialises to what
we’d expect it to. I guess we could change that?
Co-authored-by: Grahame Oakland <grahame.oakland@guardian.co.uk>1 parent bd7929f commit d7759d7
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
0 commit comments