@@ -14,7 +14,7 @@ import (
1414 "github.com/graphql-go/graphql/language/source"
1515)
1616
17- func TestBadToken (t * testing.T ) {
17+ func TestParser_BadToken (t * testing.T ) {
1818 _ , err := Parse (ParseParams {
1919 Source : & source.Source {
2020 Body : []byte ("query _ {\n me {\n id`\n }\n }" ),
@@ -26,7 +26,7 @@ func TestBadToken(t *testing.T) {
2626 }
2727}
2828
29- func TestAcceptsOptionToNotIncludeSource (t * testing.T ) {
29+ func TestParser_AcceptsOptionToNotIncludeSource (t * testing.T ) {
3030 opts := ParseOptions {
3131 NoSource : true ,
3232 }
@@ -80,7 +80,7 @@ func TestAcceptsOptionToNotIncludeSource(t *testing.T) {
8080 }
8181}
8282
83- func TestParseProvidesUsefulErrors (t * testing.T ) {
83+ func TestParser_ParseProvidesUsefulErrors (t * testing.T ) {
8484 opts := ParseOptions {
8585 NoSource : true ,
8686 }
@@ -135,7 +135,7 @@ fragment MissingOn Type
135135
136136}
137137
138- func TestParseProvidesUsefulErrorsWhenUsingSource (t * testing.T ) {
138+ func TestParser_ParseProvidesUsefulErrorsWhenUsingSource (t * testing.T ) {
139139 test := errorMessageTest {
140140 source .NewSource (& source.Source {
141141 Body : []byte ("query" ),
@@ -147,7 +147,7 @@ func TestParseProvidesUsefulErrorsWhenUsingSource(t *testing.T) {
147147 testErrorMessage (t , test )
148148}
149149
150- func TestParsesVariableInlineValues (t * testing.T ) {
150+ func TestParser_ParsesVariableInlineValues (t * testing.T ) {
151151 source := `{ field(complex: { a: { b: [ $var ] } }) }`
152152 // should not return error
153153 _ , err := Parse (ParseParams {Source : source })
@@ -156,7 +156,7 @@ func TestParsesVariableInlineValues(t *testing.T) {
156156 }
157157}
158158
159- func TestParsesConstantDefaultValues (t * testing.T ) {
159+ func TestParser_ParsesConstantDefaultValues (t * testing.T ) {
160160 test := errorMessageTest {
161161 `query Foo($x: Complex = { a: { b: [ $var ] } }) { field }` ,
162162 `Syntax Error GraphQL (1:37) Unexpected $` ,
@@ -165,7 +165,7 @@ func TestParsesConstantDefaultValues(t *testing.T) {
165165 testErrorMessage (t , test )
166166}
167167
168- func TestDoesNotAcceptFragmentsNameOn (t * testing.T ) {
168+ func TestParser_DoesNotAcceptFragmentsNameOn (t * testing.T ) {
169169 test := errorMessageTest {
170170 `fragment on on on { on }` ,
171171 `Syntax Error GraphQL (1:10) Unexpected Name "on"` ,
@@ -174,7 +174,7 @@ func TestDoesNotAcceptFragmentsNameOn(t *testing.T) {
174174 testErrorMessage (t , test )
175175}
176176
177- func TestDoesNotAcceptFragmentsSpreadOfOn (t * testing.T ) {
177+ func TestParser_DoesNotAcceptFragmentsSpreadOfOn (t * testing.T ) {
178178 test := errorMessageTest {
179179 `{ ...on }'` ,
180180 `Syntax Error GraphQL (1:9) Expected Name, found }` ,
@@ -183,7 +183,7 @@ func TestDoesNotAcceptFragmentsSpreadOfOn(t *testing.T) {
183183 testErrorMessage (t , test )
184184}
185185
186- func TestDoesNotAllowNullAsValue (t * testing.T ) {
186+ func TestParser_DoesNotAllowNullAsValue (t * testing.T ) {
187187 test := errorMessageTest {
188188 `{ fieldWithNullableStringInput(input: null) }'` ,
189189 `Syntax Error GraphQL (1:39) Unexpected Name "null"` ,
@@ -192,7 +192,7 @@ func TestDoesNotAllowNullAsValue(t *testing.T) {
192192 testErrorMessage (t , test )
193193}
194194
195- func TestParsesMultiByteCharacters_Unicode (t * testing.T ) {
195+ func TestParser_ParsesMultiByteCharacters_Unicode (t * testing.T ) {
196196
197197 doc := `
198198 # This comment has a \u0A0A multi-byte character.
@@ -269,7 +269,7 @@ func TestParsesMultiByteCharacters_Unicode(t *testing.T) {
269269 }
270270}
271271
272- func TestParsesMultiByteCharacters_UnicodeText (t * testing.T ) {
272+ func TestParser_ParsesMultiByteCharacters_UnicodeText (t * testing.T ) {
273273
274274 doc := `
275275 # This comment has a фы世界 multi-byte character.
@@ -346,7 +346,7 @@ func TestParsesMultiByteCharacters_UnicodeText(t *testing.T) {
346346 }
347347}
348348
349- func TestParsesKitchenSink (t * testing.T ) {
349+ func TestParser_ParsesKitchenSink (t * testing.T ) {
350350 b , err := ioutil .ReadFile ("../../kitchen-sink.graphql" )
351351 if err != nil {
352352 t .Fatalf ("unable to load kitchen-sink.graphql" )
@@ -358,7 +358,7 @@ func TestParsesKitchenSink(t *testing.T) {
358358 }
359359}
360360
361- func TestAllowsNonKeywordsAnywhereNameIsAllowed (t * testing.T ) {
361+ func TestParser_AllowsNonKeywordsAnywhereNameIsAllowed (t * testing.T ) {
362362 nonKeywords := []string {
363363 "on" ,
364364 "fragment" ,
@@ -389,7 +389,7 @@ func TestAllowsNonKeywordsAnywhereNameIsAllowed(t *testing.T) {
389389 }
390390}
391391
392- func TestParsesExperimentalSubscriptionFeature (t * testing.T ) {
392+ func TestParser_ParsesExperimentalSubscriptionFeature (t * testing.T ) {
393393 source := `
394394 subscription Foo {
395395 subscriptionField
@@ -401,7 +401,7 @@ func TestParsesExperimentalSubscriptionFeature(t *testing.T) {
401401 }
402402}
403403
404- func TestParsesAnonymousMutationOperations (t * testing.T ) {
404+ func TestParser_ParsesAnonymousMutationOperations (t * testing.T ) {
405405 source := `
406406 mutation {
407407 mutationField
@@ -413,7 +413,7 @@ func TestParsesAnonymousMutationOperations(t *testing.T) {
413413 }
414414}
415415
416- func TestParsesAnonymousSubscriptionOperations (t * testing.T ) {
416+ func TestParser_ParsesAnonymousSubscriptionOperations (t * testing.T ) {
417417 source := `
418418 subscription {
419419 subscriptionField
@@ -425,7 +425,7 @@ func TestParsesAnonymousSubscriptionOperations(t *testing.T) {
425425 }
426426}
427427
428- func TestParsesNamedMutationOperations (t * testing.T ) {
428+ func TestParser_ParsesNamedMutationOperations (t * testing.T ) {
429429 source := `
430430 mutation Foo {
431431 mutationField
@@ -437,7 +437,7 @@ func TestParsesNamedMutationOperations(t *testing.T) {
437437 }
438438}
439439
440- func TestParsesNamedSubscriptionOperations (t * testing.T ) {
440+ func TestParser_ParsesNamedSubscriptionOperations (t * testing.T ) {
441441 source := `
442442 subscription Foo {
443443 subscriptionField
@@ -449,7 +449,7 @@ func TestParsesNamedSubscriptionOperations(t *testing.T) {
449449 }
450450}
451451
452- func TestParsesFieldDefinitionWithDescription (t * testing.T ) {
452+ func TestParser_ParsesFieldDefinitionWithDescription (t * testing.T ) {
453453 source := `
454454 type Foo implements Bar {
455455 """
@@ -464,7 +464,7 @@ func TestParsesFieldDefinitionWithDescription(t *testing.T) {
464464 }
465465}
466466
467- func TestParsesInputValueDefinitionWithDescription (t * testing.T ) {
467+ func TestParser_ParsesInputValueDefinitionWithDescription (t * testing.T ) {
468468 source := `
469469 type Foo implements Bar {
470470 foo(
@@ -481,7 +481,7 @@ func TestParsesInputValueDefinitionWithDescription(t *testing.T) {
481481 }
482482}
483483
484- func TestParsesEnumValueDefinitionWithDescription (t * testing.T ) {
484+ func TestParser_ParsesEnumValueDefinitionWithDescription (t * testing.T ) {
485485 source := `
486486 enum Site {
487487 "description 1"
@@ -498,7 +498,7 @@ func TestParsesEnumValueDefinitionWithDescription(t *testing.T) {
498498 }
499499}
500500
501- func TestDefinitionsWithDescriptions (t * testing.T ) {
501+ func TestParser_DefinitionsWithDescriptions (t * testing.T ) {
502502 testCases := []struct {
503503 name string
504504 source string
@@ -609,7 +609,7 @@ func TestDefinitionsWithDescriptions(t *testing.T) {
609609 }
610610}
611611
612- func TestParseCreatesAst (t * testing.T ) {
612+ func TestParser_ParseCreatesAst (t * testing.T ) {
613613 body := `{
614614 node(id: 4) {
615615 id,
@@ -736,7 +736,7 @@ func TestParseCreatesAst(t *testing.T) {
736736
737737}
738738
739- func TestDoesNotAcceptStringAsDefinition (t * testing.T ) {
739+ func TestParser_DoesNotAcceptStringAsDefinition (t * testing.T ) {
740740 test := errorMessageTest {
741741 `String` ,
742742 `Syntax Error GraphQL (1:1) Unexpected Name "String"` ,
0 commit comments