Ai
1 Star 0 Fork 0

麦冬果果/graphql-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
values_test.go 461 Bytes
一键复制 编辑 原始数据 按行查看 历史
Alex Flint 提交于 2018-05-26 02:43 +08:00 . treat arrays as iterable
package graphql
import "testing"
func TestIsIterable(t *testing.T) {
if !isIterable([]int{}) {
t.Fatal("expected isIterable to return true for a slice, got false")
}
if !isIterable([]int{}) {
t.Fatal("expected isIterable to return true for an array, got false")
}
if isIterable(1) {
t.Fatal("expected isIterable to return false for an int, got true")
}
if isIterable(nil) {
t.Fatal("expected isIterable to return false for nil, got true")
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mdgg0816/graphql-go.git
git@gitee.com:mdgg0816/graphql-go.git
mdgg0816
graphql-go
graphql-go
v0.7.6

搜索帮助