@@ -18,7 +18,6 @@ package vpack
1818
1919import (
2020 "encoding/json"
21- "fmt"
2221 "reflect"
2322 "slices"
2423 "testing"
@@ -123,45 +122,45 @@ func TestStatelessDecoderErrors(t *testing.T) {
123122
124123 cases := []tc {
125124 // ---------- cred ----------
126- {"pf-bin80" , fmt . Sprintf ( "field %s" , msgpFixstrPf ) ,
125+ {"pf-bin80" , "field pf" ,
127126 func () []byte { return slices .Concat (h (0 ), z (79 )) }},
128127
129128 // ---------- r.per ----------
130- {"per-varuint-marker" , fmt . Sprintf ( "field %s" , msgpFixstrPer ) ,
129+ {"per-varuint-marker" , "field per" ,
131130 func () []byte { return slices .Concat (h (bitPer ), pf ) }},
132131
133132 // ---------- r.prop.* ----------
134- {"dig-bin32" , fmt . Sprintf ( "field %s" , msgpFixstrDig ) ,
133+ {"dig-bin32" , "field dig" ,
135134 func () []byte { return slices .Concat (h (bitDig ), pf , z (10 )) }},
136- {"encdig-bin32" , fmt . Sprintf ( "field %s" , msgpFixstrEncdig ) ,
135+ {"encdig-bin32" , "field encdig" ,
137136 func () []byte { return slices .Concat (h (bitDig | bitEncDig ), pf , z32 , z (10 )) }},
138- {"oper-varuint-marker" , fmt . Sprintf ( "field %s" , msgpFixstrOper ) ,
137+ {"oper-varuint-marker" , "field oper" ,
139138 func () []byte { return slices .Concat (h (bitOper ), pf ) }},
140- {"oprop-bin32" , fmt . Sprintf ( "field %s" , msgpFixstrOprop ) ,
139+ {"oprop-bin32" , "field oprop" ,
141140 func () []byte { return slices .Concat (h (bitOprop ), pf , z (5 )) }},
142141
143142 // ---------- r.rnd ----------
144- {"rnd-varuint-marker" , fmt . Sprintf ( "field %s" , msgpFixstrRnd ) ,
143+ {"rnd-varuint-marker" , "field rnd" ,
145144 func () []byte { return slices .Concat (h (0 ), pf ) }},
146- {"rnd-varuint-trunc" , fmt . Sprintf ( "not enough data for varuint (need 4 bytes) for field %s" , msgpFixstrRnd ) ,
145+ {"rnd-varuint-trunc" , "not enough data for varuint (need 4 bytes) for field rnd" ,
147146 func () []byte { return slices .Concat (h (0 ), pf , []byte {msgpUint32 , 0x00 }) }},
148147
149148 // ---------- r.snd / r.step ----------
150- {"snd-bin32" , fmt . Sprintf ( "field %s" , msgpFixstrSnd ) ,
149+ {"snd-bin32" , "field snd" ,
151150 func () []byte { return slices .Concat (h (0 ), pf , fix1 ) }},
152- {"step-varuint-marker" , fmt . Sprintf ( "field %s" , msgpFixstrStep ) ,
151+ {"step-varuint-marker" , "field step" ,
153152 func () []byte { return slices .Concat (h (bitStep ), pf , fix1 , z32 ) }},
154153
155154 // ---------- sig.* ----------
156- {"p-bin32" , fmt . Sprintf ( "field %s" , msgpFixstrP ) ,
155+ {"p-bin32" , "field p" ,
157156 func () []byte { return slices .Concat (h (0 ), pf , fix1 , z32 ) }},
158- {"p1s-bin64" , fmt . Sprintf ( "field %s" , msgpFixstrP1s ) ,
157+ {"p1s-bin64" , "field p1s" ,
159158 func () []byte { return slices .Concat (h (0 ), pf , fix1 , z32 , z32 , z (12 )) }},
160- {"p2-bin32" , fmt . Sprintf ( "field %s" , msgpFixstrP2 ) ,
159+ {"p2-bin32" , "field p2" ,
161160 func () []byte { return slices .Concat (h (0 ), pf , fix1 , z32 , z32 , z64 ) }},
162- {"p2s-bin64" , fmt . Sprintf ( "field %s" , msgpFixstrP2s ) ,
161+ {"p2s-bin64" , "field p2s" ,
163162 func () []byte { return slices .Concat (h (0 ), pf , fix1 , z32 , z32 , z64 , z32 , z (3 )) }},
164- {"s-bin64" , fmt . Sprintf ( "field %s" , msgpFixstrS ) ,
163+ {"s-bin64" , "field s" ,
165164 func () []byte { return slices .Concat (h (0 ), pf , fix1 , z32 , z32 , z64 , z32 , z64 ) }},
166165
167166 // ---------- trailing data ----------
0 commit comments