代码拉取完成,页面将自动刷新
package ffmt
import (
"time"
"testing"
)
func TestMultiPrint(t *testing.T) {
ff := []func(a ...interface{}) string{
Sputs,
Sp,
Sd,
Sprint,
Spjson,
}
for _, f := range ff {
if f([]interface{}{1, 2}) != f(1, 2) {
t.Fail()
}
}
}
func TestNewOptional(t *testing.T) {
o := NewOptional(0, 0, 0)
o.Print(testdata)
}
func TestPrint(t *testing.T) {
Print(testdata)
}
func TestPuts(t *testing.T) {
Puts(testdata)
}
func TestP(t *testing.T) {
P(testdata)
}
func TestPjson(t *testing.T) {
Pjson(testdata)
}
func TestD(t *testing.T) {
D(testdata)
}
type bbb struct {
A int
}
type T struct {
bbb
Msg string
Msg2 string
Msg3 string
msg string
Msgs []string
Stru []struct {
Msg string
AA [8]int
}
Floats [6]float32
Ints [][]int
Maps map[string]string
B bool
T time.Time
TTT interface{}
TTT2 interface{}
Chan interface{}
Fun interface{}
Uintptr uintptr
Self *T
}
var testdata *T
func init() {
testdata = &T{
bbb{},
"Display a friendly fmt for golang",
"你好",
"hello all hello all hello all hello all hello all hello all ",
"Display ",
[]string{"hello", "world", "bey", "bey", "宽字符制表显示正常仅限等宽字体", "效率又降低了", "哈哈哈哈哈啊", "咳咳", "然而并没有什么卵用"},
[]struct {
Msg string
AA [8]int
}{{}, {
"Test",
[8]int{2222, 3333},
}},
[6]float32{2.1, 3.3},
[][]int{{1, 4, 5, 1, 4, 5, 6, 11999, 0}, {3}, {}},
map[string]string{
"aa": "hi world",
"bb": "bye world",
"一二三四五12345adcde": "1122334455",
"鱼鱼鱼": "yuyuyu",
},
true,
time.Now(),
nil,
(*int)(nil),
make(chan int, 10),
Printf,
0x12345,
nil,
}
testdata.Self = testdata
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。