summaryrefslogtreecommitdiff
path: root/compat/json/borrowed_stream_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'compat/json/borrowed_stream_test.go')
-rw-r--r--compat/json/borrowed_stream_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/compat/json/borrowed_stream_test.go b/compat/json/borrowed_stream_test.go
index 80f6f03..6c3a403 100644
--- a/compat/json/borrowed_stream_test.go
+++ b/compat/json/borrowed_stream_test.go
@@ -41,6 +41,7 @@ false
`
func TestEncoder(t *testing.T) {
+ t.Parallel() // MODIFIED: added
for i := 0; i <= len(streamTest); i++ {
var buf bytes.Buffer
enc := NewEncoder(&buf)
@@ -78,6 +79,7 @@ false
`
func TestEncoderIndent(t *testing.T) {
+ t.Parallel() // MODIFIED: added
var buf bytes.Buffer
enc := NewEncoder(&buf)
enc.SetIndent(">", ".")
@@ -105,6 +107,7 @@ func (s *strPtrMarshaler) MarshalJSON() ([]byte, error) {
}
func TestEncoderSetEscapeHTML(t *testing.T) {
+ t.Parallel() // MODIFIED: added
var c C
var ct CText
var tagStruct struct {
@@ -173,6 +176,7 @@ func TestEncoderSetEscapeHTML(t *testing.T) {
}
func TestDecoder(t *testing.T) {
+ t.Parallel() // MODIFIED: added
for i := 0; i <= len(streamTest); i++ {
// Use stream without newlines as input,
// just to stress the decoder even more.
@@ -205,6 +209,7 @@ func TestDecoder(t *testing.T) {
}
func TestDecoderBuffered(t *testing.T) {
+ t.Parallel() // MODIFIED: added
r := strings.NewReader(`{"Name": "Gopher"} extra `)
var m struct {
Name string
@@ -241,6 +246,7 @@ func nlines(s string, n int) string {
}
func TestRawMessage(t *testing.T) {
+ t.Parallel() // MODIFIED: added
var data struct {
X float64
Id RawMessage
@@ -265,6 +271,7 @@ func TestRawMessage(t *testing.T) {
}
func TestNullRawMessage(t *testing.T) {
+ t.Parallel() // MODIFIED: added
var data struct {
X float64
Id RawMessage
@@ -297,6 +304,7 @@ var blockingTests = []string{
}
func TestBlocking(t *testing.T) {
+ t.Parallel() // MODIFIED: added
for _, enc := range blockingTests {
r, w := net.Pipe()
ch := make(chan error) // MODIFIED: added
@@ -451,6 +459,7 @@ func TestDecodeInStream(t *testing.T) {
// Test from golang.org/issue/11893
func TestHTTPDecoding(t *testing.T) {
+ t.Parallel() // MODIFIED: added
const raw = `{ "foo": "bar" }`
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {