@@ -2791,7 +2791,7 @@ func TestUnmarshalNil(t *testing.T) {
27912791 value any
27922792 wantValue any
27932793 }{
2794- // Unmarshalling CBOR null to the following types is a no-op.
2794+ // Unmarshaling CBOR null to the following types is a no-op.
27952795 {
27962796 name : "bool" ,
27972797 value : true ,
@@ -2868,7 +2868,7 @@ func TestUnmarshalNil(t *testing.T) {
28682868 wantValue : [3 ]int {1 , 2 , 3 },
28692869 },
28702870
2871- // Unmarshalling CBOR null to slice/map sets Go values to nil.
2871+ // Unmarshaling CBOR null to slice/map sets Go values to nil.
28722872 {
28732873 name : "[]byte" ,
28742874 value : []byte {1 , 2 , 3 },
@@ -2885,35 +2885,35 @@ func TestUnmarshalNil(t *testing.T) {
28852885 wantValue : map [string ]bool (nil ),
28862886 },
28872887
2888- // Unmarshalling CBOR null to ByteString (string wrapper for []byte) resets ByteString to empty string.
2888+ // Unmarshaling CBOR null to ByteString (string wrapper for []byte) resets ByteString to empty string.
28892889 {
28902890 name : "cbor.ByteString" ,
28912891 value : ByteString ("\x01 \x02 \x03 " ),
28922892 wantValue : ByteString ("" ),
28932893 },
28942894
2895- // Unmarshalling CBOR null to time.Time is a no-op.
2895+ // Unmarshaling CBOR null to time.Time is a no-op.
28962896 {
28972897 name : "time.Time" ,
28982898 value : time .Date (2020 , time .January , 2 , 3 , 4 , 5 , 6 , time .UTC ),
28992899 wantValue : time .Date (2020 , time .January , 2 , 3 , 4 , 5 , 6 , time .UTC ),
29002900 },
29012901
2902- // Unmarshalling CBOR null to big.Int is a no-op.
2902+ // Unmarshaling CBOR null to big.Int is a no-op.
29032903 {
29042904 name : "big.Int" ,
29052905 value : mustBigInt ("123" ),
29062906 wantValue : mustBigInt ("123" ),
29072907 },
29082908
2909- // Unmarshalling CBOR null to user defined struct types is a no-op.
2909+ // Unmarshaling CBOR null to user defined struct types is a no-op.
29102910 {
29112911 name : "user defined struct" ,
29122912 value : T {I : 123 },
29132913 wantValue : T {I : 123 },
29142914 },
29152915
2916- // Unmarshalling CBOR null to cbor.Tag and cbor.RawTag is a no-op.
2916+ // Unmarshaling CBOR null to cbor.Tag and cbor.RawTag is a no-op.
29172917 {
29182918 name : "cbor.RawTag" ,
29192919 value : RawTag {123 , []byte {4 , 5 , 6 }},
@@ -2925,25 +2925,25 @@ func TestUnmarshalNil(t *testing.T) {
29252925 wantValue : Tag {123 , "hello world" },
29262926 },
29272927
2928- // Unmarshalling to cbor.RawMessage sets cbor.RawMessage to raw CBOR bytes (0xf6 or 0xf7).
2928+ // Unmarshaling to cbor.RawMessage sets cbor.RawMessage to raw CBOR bytes (0xf6 or 0xf7).
29292929 // It's tested in TestUnmarshal().
29302930
2931- // Unmarshalling to types implementing cbor.BinaryUnmarshaler is a no-op.
2931+ // Unmarshaling to types implementing cbor.BinaryUnmarshaler is a no-op.
29322932 {
29332933 name : "cbor.BinaryUnmarshaler" ,
29342934 value : number (456 ),
29352935 wantValue : number (456 ),
29362936 },
29372937
2938- // When unmarshalling to types implementing cbor.Unmarshaler,
2938+ // When unmarshaling to types implementing cbor.Unmarshaler,
29392939 {
29402940 name : "cbor.Unmarshaler" ,
29412941 value : nilUnmarshaler ("hello world" ),
29422942 wantValue : nilUnmarshaler ("null" ),
29432943 },
29442944 }
29452945
2946- // Unmarshalling to values of specified Go types.
2946+ // Unmarshaling to values of specified Go types.
29472947 for _ , tc := range testCases {
29482948 t .Run (tc .name , func (t * testing.T ) {
29492949 for _ , data := range data {
@@ -7506,7 +7506,7 @@ func TestUnmarshalTagNum55799(t *testing.T) {
75067506 copy (data [3 :], tagNum55799 )
75077507 copy (data [6 :], tc .data )
75087508
7509- // Test unmarshalling CBOR into empty interface.
7509+ // Test unmarshaling CBOR into empty interface.
75107510 var v any
75117511 if err := Unmarshal (data , & v ); err != nil {
75127512 t .Errorf ("Unmarshal(0x%x) returned error %v" , data , err )
@@ -7520,15 +7520,15 @@ func TestUnmarshalTagNum55799(t *testing.T) {
75207520 }
75217521 }
75227522
7523- // Test unmarshalling CBOR into RawMessage.
7523+ // Test unmarshaling CBOR into RawMessage.
75247524 var r RawMessage
75257525 if err := Unmarshal (data , & r ); err != nil {
75267526 t .Errorf ("Unmarshal(0x%x) returned error %v" , data , err )
75277527 } else if ! bytes .Equal (r , tc .data ) {
75287528 t .Errorf ("Unmarshal(0x%x) returned RawMessage %v, want %v" , data , r , tc .data )
75297529 }
75307530
7531- // Test unmarshalling CBOR into compatible data types.
7531+ // Test unmarshaling CBOR into compatible data types.
75327532 for _ , value := range tc .wantValues {
75337533 v := reflect .New (reflect .TypeOf (value ))
75347534 vPtr := v .Interface ()
@@ -7545,7 +7545,7 @@ func TestUnmarshalTagNum55799(t *testing.T) {
75457545 }
75467546 }
75477547
7548- // Test unmarshalling CBOR into incompatible data types.
7548+ // Test unmarshaling CBOR into incompatible data types.
75497549 for _ , typ := range tc .wrongTypes {
75507550 v := reflect .New (typ )
75517551 vPtr := v .Interface ()
@@ -7571,23 +7571,23 @@ func TestUnmarshalFloatWithTagNum55799(t *testing.T) {
75717571 copy (data , tagNum55799 )
75727572 copy (data [3 :], tc .data )
75737573
7574- // Test unmarshalling CBOR into empty interface.
7574+ // Test unmarshaling CBOR into empty interface.
75757575 var v any
75767576 if err := Unmarshal (tc .data , & v ); err != nil {
75777577 t .Errorf ("Unmarshal(0x%x) returned error %v" , tc .data , err )
75787578 } else {
75797579 compareFloats (t , tc .data , v , tc .wantInterfaceValue , tc .equalityThreshold )
75807580 }
75817581
7582- // Test unmarshalling CBOR into RawMessage.
7582+ // Test unmarshaling CBOR into RawMessage.
75837583 var r RawMessage
75847584 if err := Unmarshal (tc .data , & r ); err != nil {
75857585 t .Errorf ("Unmarshal(0x%x) returned error %v" , tc .data , err )
75867586 } else if ! bytes .Equal (r , tc .data ) {
75877587 t .Errorf ("Unmarshal(0x%x) returned RawMessage %v, want %v" , tc .data , r , tc .data )
75887588 }
75897589
7590- // Test unmarshalling CBOR into compatible data types.
7590+ // Test unmarshaling CBOR into compatible data types.
75917591 for _ , value := range tc .wantValues {
75927592 v := reflect .New (reflect .TypeOf (value ))
75937593 vPtr := v .Interface ()
@@ -7598,7 +7598,7 @@ func TestUnmarshalFloatWithTagNum55799(t *testing.T) {
75987598 }
75997599 }
76007600
7601- // Test unmarshalling CBOR into incompatible data types.
7601+ // Test unmarshaling CBOR into incompatible data types.
76027602 for _ , typ := range unmarshalFloatWrongTypes {
76037603 v := reflect .New (typ )
76047604 vPtr := v .Interface ()
@@ -7638,7 +7638,7 @@ func TestUnmarshalTagNum55799AsElement(t *testing.T) {
76387638 }
76397639 for _ , tc := range testCases {
76407640 t .Run (tc .name , func (t * testing.T ) {
7641- // Test unmarshalling CBOR into empty interface.
7641+ // Test unmarshaling CBOR into empty interface.
76427642 var v any
76437643 if err := Unmarshal (tc .data , & v ); err != nil {
76447644 t .Errorf ("Unmarshal(0x%x) returned error %v" , tc .data , err )
@@ -7652,7 +7652,7 @@ func TestUnmarshalTagNum55799AsElement(t *testing.T) {
76527652 }
76537653 }
76547654
7655- // Test unmarshalling CBOR into compatible data types.
7655+ // Test unmarshaling CBOR into compatible data types.
76567656 for _ , value := range tc .values {
76577657 v := reflect .New (reflect .TypeOf (value ))
76587658 vPtr := v .Interface ()
@@ -7669,7 +7669,7 @@ func TestUnmarshalTagNum55799AsElement(t *testing.T) {
76697669 }
76707670 }
76717671
7672- // Test unmarshalling CBOR into incompatible data types.
7672+ // Test unmarshaling CBOR into incompatible data types.
76737673 for _ , typ := range tc .wrongTypes {
76747674 v := reflect .New (typ )
76757675 vPtr := v .Interface ()
0 commit comments