This file is indexed.

/usr/share/gocode/src/github.com/smartystreets/goconvey/assertions/serializer_test.go is in golang-github-smartystreets-goconvey-dev 1.5.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package assertions

import (
	"encoding/json"
	"fmt"
	"testing"

	"github.com/smartystreets/goconvey/reporting"
)

func TestSerializerCreatesSerializedVersionOfAssertionResult(t *testing.T) {
	thing1 := Thing1{"Hi"}
	thing2 := Thing2{"Bye"}
	message := "Super-hip failure message."
	serializer := newSerializer()

	actualResult := serializer.serialize(thing1, thing2, message)

	expectedResult, _ := json.Marshal(reporting.FailureView{
		Message:  message,
		Expected: fmt.Sprintf("%v", thing1),
		Actual:   fmt.Sprintf("%v", thing2),
	})

	if actualResult != string(expectedResult) {
		t.Errorf("\nExpected: %s\nActual:   %s", string(expectedResult), actualResult)
	}
}