diff options
| author | Filippo Valsorda <filippo@golang.org> | 2018-10-24 13:16:04 -0400 |
|---|---|---|
| committer | Filippo Valsorda <filippo@golang.org> | 2018-10-25 19:07:36 +0000 |
| commit | f6b554fec75ff1a36c6204755db8c1f638255b64 (patch) | |
| tree | ad4e0378bfedb3c3f1bd26ebb5d2699341f7e9b9 /test/codegen/mathbits.go | |
| parent | a7fb5e1bd2d655c275fdf513fe0ea7ea7517e675 (diff) | |
| download | go-f6b554fec75ff1a36c6204755db8c1f638255b64.tar.xz | |
crypto/tls: replace custom equal implementations with reflect.DeepEqual
The equal methods were only there for testing, and I remember regularly
getting them wrong while developing tls-tris. Replace them with simple
reflect.DeepEqual calls.
The only special thing that equal() would do is ignore the difference
between a nil and a zero-length slice. Fixed the Generate methods so
that they create the same value that unmarshal will decode. The
difference is not important: it wasn't tested, all checks are
"len(slice) > 0", and all cases in which presence matters are
accompanied by a boolean.
Change-Id: Iaabf56ea17c2406b5107c808c32f6c85b611aaa8
Reviewed-on: https://go-review.googlesource.com/c/144114
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
Diffstat (limited to 'test/codegen/mathbits.go')
0 files changed, 0 insertions, 0 deletions
