Commit db4675f2 authored by Tobias Klauser's avatar Tobias Klauser Committed by Brad Fitzpatrick

encoding/asn1: gofmt

CL 113837 introduced some changes which were not properly gofmt'ed, fix them.

Change-Id: I89329063f9c468238051e45380d752e66efdb939
Reviewed-on: https://go-review.googlesource.com/116895
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 581ed192
...@@ -8,10 +8,10 @@ import ( ...@@ -8,10 +8,10 @@ import (
"bytes" "bytes"
"encoding/hex" "encoding/hex"
"math/big" "math/big"
"reflect"
"strings" "strings"
"testing" "testing"
"time" "time"
"reflect"
) )
type intStruct struct { type intStruct struct {
...@@ -258,9 +258,9 @@ func TestMarshalOID(t *testing.T) { ...@@ -258,9 +258,9 @@ func TestMarshalOID(t *testing.T) {
var marshalTestsOID = []marshalTest{ var marshalTestsOID = []marshalTest{
{[]byte("\x06\x01\x30"), "0403060130"}, // bytes format returns a byte sequence \x04 {[]byte("\x06\x01\x30"), "0403060130"}, // bytes format returns a byte sequence \x04
// {ObjectIdentifier([]int{0}), "060100"}, // returns an error as OID 0.0 has the same encoding // {ObjectIdentifier([]int{0}), "060100"}, // returns an error as OID 0.0 has the same encoding
{[]byte("\x06\x010"), "0403060130"}, // same as above "\x06\x010" = "\x06\x01" + "0" {[]byte("\x06\x010"), "0403060130"}, // same as above "\x06\x010" = "\x06\x01" + "0"
{ObjectIdentifier([]int{2,999,3}), "0603883703"}, // Example of ITU-T X.690 {ObjectIdentifier([]int{2, 999, 3}), "0603883703"}, // Example of ITU-T X.690
{ObjectIdentifier([]int{0,0}), "060100"}, // zero OID {ObjectIdentifier([]int{0, 0}), "060100"}, // zero OID
} }
for i, test := range marshalTestsOID { for i, test := range marshalTestsOID {
data, err := Marshal(test.in) data, err := Marshal(test.in)
...@@ -294,7 +294,7 @@ func TestIssue11130(t *testing.T) { ...@@ -294,7 +294,7 @@ func TestIssue11130(t *testing.T) {
return return
} }
if !bytes.Equal(data,data1) { if !bytes.Equal(data, data1) {
t.Errorf("got: %q, want: %q \n", data1, data) t.Errorf("got: %q, want: %q \n", data1, data)
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment