1 Star 0 Fork 0

jawide / toml2go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
toml2go_test.go 689 Bytes
一键复制 编辑 原始数据 按行查看 历史
jawide 提交于 2021-11-14 20:51 . export Toml2Go
package toml2go
import "testing"
func Test_toml2go(t *testing.T) {
type args struct {
tomlStr string
inline bool
}
tests := []struct {
name string
args args
want string
wantErr bool
}{
{"1", args{
tomlStr: "a=1",
inline: true,
}, "", false},
{"2", args{
tomlStr: "a=",
inline: true,
}, "", true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
_, err := Toml2Go(tt.args.tomlStr, tt.args.inline)
if (err != nil) != tt.wantErr {
t.Errorf("toml2go() error = %v, wantErr %v", err, tt.wantErr)
return
}
//if got != tt.want {
// t.Errorf("toml2go() got = %v, want %v", got, tt.want)
//}
})
}
}
1
https://gitee.com/jawide/toml2go.git
git@gitee.com:jawide/toml2go.git
jawide
toml2go
toml2go
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891