...
1 package graphql_test
2
3 import (
4 "testing"
5
6 "github.com/cli/shurcooL-graphql"
7 )
8
9 func TestNewScalars(t *testing.T) {
10 if got := graphql.NewBoolean(false); got == nil {
11 t.Error("NewBoolean returned nil")
12 }
13 if got := graphql.NewFloat(0.0); got == nil {
14 t.Error("NewFloat returned nil")
15 }
16
17 if got := graphql.NewID(""); got == nil {
18 t.Error("NewID returned nil")
19 }
20
21 if got := graphql.NewID(0); got == nil {
22 t.Error("NewID returned nil")
23 }
24 if got := graphql.NewInt(0); got == nil {
25 t.Error("NewInt returned nil")
26 }
27 if got := graphql.NewString(""); got == nil {
28 t.Error("NewString returned nil")
29 }
30 }
31
View as plain text