Files
LeetCode-Go/leetcode/0661.Image-Smoother/661. Image Smoother_test.go
2020-08-11 23:46:26 +08:00

53 lines
1016 B
Go

package leetcode
import (
"fmt"
"testing"
)
type question661 struct {
para661
ans661
}
// para 是参数
// one 代表第一个参数
type para661 struct {
one [][]int
}
// ans 是答案
// one 代表第一个答案
type ans661 struct {
one [][]int
}
func Test_Problem661(t *testing.T) {
qs := []question661{
question661{
para661{[][]int{[]int{1, 1, 1}, []int{1, 1, 2}}},
ans661{[][]int{[]int{1, 1, 1}, []int{1, 1, 1}}},
},
question661{
para661{[][]int{[]int{1, 1, 1}, []int{1, 1, 2}, []int{1, 1, 1}}},
ans661{[][]int{[]int{1, 1, 1}, []int{1, 1, 1}, []int{1, 1, 1}}},
},
question661{
para661{[][]int{[]int{1, 1, 1}, []int{1, 0, 1}, []int{1, 1, 1}}},
ans661{[][]int{[]int{0, 0, 0}, []int{0, 0, 0}, []int{0, 0, 0}}},
},
}
fmt.Printf("------------------------Leetcode Problem 661------------------------\n")
for _, q := range qs {
_, p := q.ans661, q.para661
fmt.Printf("【input】:%v 【output】:%v\n", p, imageSmoother(p.one))
}
fmt.Printf("\n\n\n")
}