@@ -234,19 +234,19 @@ func TestReport_HasIgnoredVulnerabilities(t *testing.T) {
234234 }
235235}
236236
237- func TestReport_ToString_NoVulnerabilities (t * testing.T ) {
237+ func TestReport_String_NoVulnerabilities (t * testing.T ) {
238238 t .Parallel ()
239239
240240 msg := "no known vulnerabilities found"
241241
242242 r := reporter.Report {}
243243
244- if actual := r .ToString (); ! strings .Contains (actual , msg ) {
244+ if actual := r .String (); ! strings .Contains (actual , msg ) {
245245 t .Errorf ("Expected \" %s\" to contain \" %s\" but it did not" , actual , msg )
246246 }
247247}
248248
249- func TestReport_ToString_OneVulnerability (t * testing.T ) {
249+ func TestReport_String_OneVulnerability (t * testing.T ) {
250250 t .Parallel ()
251251
252252 expected := strings .Join ([]string {
@@ -276,12 +276,12 @@ func TestReport_ToString_OneVulnerability(t *testing.T) {
276276 },
277277 }
278278
279- if actual := r .ToString (); expected != actual {
279+ if actual := r .String (); expected != actual {
280280 t .Errorf ("\n Expected:\n %s\n Actual:\n %s" , expected , actual )
281281 }
282282}
283283
284- func TestReport_ToString_MultipleVulnerabilities (t * testing.T ) {
284+ func TestReport_String_MultipleVulnerabilities (t * testing.T ) {
285285 t .Parallel ()
286286
287287 expected := strings .Join ([]string {
@@ -334,12 +334,12 @@ func TestReport_ToString_MultipleVulnerabilities(t *testing.T) {
334334 },
335335 }
336336
337- if actual := r .ToString (); expected != actual {
337+ if actual := r .String (); expected != actual {
338338 t .Errorf ("\n Expected:\n %s\n Actual:\n %s" , expected , actual )
339339 }
340340}
341341
342- func TestReport_ToString_AllIgnoredVulnerabilities (t * testing.T ) {
342+ func TestReport_String_AllIgnoredVulnerabilities (t * testing.T ) {
343343 t .Parallel ()
344344
345345 msg := "no new vulnerabilities found (2 were ignored)"
@@ -376,12 +376,12 @@ func TestReport_ToString_AllIgnoredVulnerabilities(t *testing.T) {
376376 },
377377 }
378378
379- if actual := r .ToString (); ! strings .Contains (actual , msg ) {
379+ if actual := r .String (); ! strings .Contains (actual , msg ) {
380380 t .Errorf ("Expected \" %s\" to contain \" %s\" but it did not" , actual , msg )
381381 }
382382}
383383
384- func TestReport_ToString_SomeIgnoredVulnerability (t * testing.T ) {
384+ func TestReport_String_SomeIgnoredVulnerability (t * testing.T ) {
385385 t .Parallel ()
386386
387387 expected := strings .Join ([]string {
@@ -424,7 +424,7 @@ func TestReport_ToString_SomeIgnoredVulnerability(t *testing.T) {
424424 },
425425 }
426426
427- if actual := r .ToString (); expected != actual {
427+ if actual := r .String (); expected != actual {
428428 t .Errorf ("\n Expected:\n %s\n Actual:\n %s" , expected , actual )
429429 }
430430}
0 commit comments